# AsyncFM
Python library for interacting with the Last.fm API asynchronously.
## Installation
```bash
pip install async-fm
```
# Usage
First, you need to obtain an API key and secret from Last.fm. You can do this by creating an account on their [developer site](https://www.last.fm/api/account/create).
```python
import asyncio
import asyncfm
lastfm = asyncfm.LastFMAPI(api_key="api_key_here")
async def main():
# Get the recent tracks for a user
tracks = await lastfm.user.get_recent_tracks(username="rj")
for track in tracks.data:
print(f" ~ {track.artist} - {track.title}: image {track.images.extralarge}")
print(f"Total: {tracks.total}")
asyncio.run(main())
```
## Requirements
- aiohttp
- pydantic
## Code Formatting
The code in this repository is formatted using [Black](https://github.com/psf/black). You can format the code in your local copy of the repository using:
## Contributing
Contributions are welcome! Please open an issue or submit a pull request if you encounter a bug or would like to make an improvement.
## Testing
We currently don't have any tests for this library, but we'd love your help in adding some! If you're interested in contributing, here's what you can do:
- Fork the repo
- Install the dependencies by running: `poetry install`.
- Write your tests in `tests` directory
- Run the tests with pytest
- Submit a pull request with your changes
Thanks for considering contributing tests to this library!
## License
This project is licensed under the terms of the MIT license. See the LICENSE file for more information.
Raw data
{
"_id": null,
"home_page": "https://github.com/NachABR/async-fm",
"name": "async-fm",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10,<4.0",
"maintainer_email": "",
"keywords": "python,lastfm,aiohttp,async",
"author": "NachABR",
"author_email": "nachabr@protonmail.com",
"download_url": "https://files.pythonhosted.org/packages/71/f4/6746a842ae25f4b1d6c3851d667fd0e3c389a82e0962cbc02df4f0c85948/async_fm-0.0.5.tar.gz",
"platform": null,
"description": "# AsyncFM\n\nPython library for interacting with the Last.fm API asynchronously.\n\n## Installation\n\n```bash\npip install async-fm\n```\n\n# Usage\nFirst, you need to obtain an API key and secret from Last.fm. You can do this by creating an account on their [developer site](https://www.last.fm/api/account/create).\n\n\n```python\nimport asyncio\nimport asyncfm\n\nlastfm = asyncfm.LastFMAPI(api_key=\"api_key_here\")\n\n\nasync def main():\n # Get the recent tracks for a user\n tracks = await lastfm.user.get_recent_tracks(username=\"rj\")\n\n for track in tracks.data:\n print(f\" ~ {track.artist} - {track.title}: image {track.images.extralarge}\")\n print(f\"Total: {tracks.total}\")\n\n\nasyncio.run(main())\n```\n\n## Requirements\n- aiohttp\n- pydantic\n\n## Code Formatting\nThe code in this repository is formatted using [Black](https://github.com/psf/black). You can format the code in your local copy of the repository using:\n\n## Contributing\nContributions are welcome! Please open an issue or submit a pull request if you encounter a bug or would like to make an improvement.\n\n## Testing\nWe currently don't have any tests for this library, but we'd love your help in adding some! If you're interested in contributing, here's what you can do:\n\n- Fork the repo\n- Install the dependencies by running: `poetry install`.\n- Write your tests in `tests` directory\n- Run the tests with pytest\n- Submit a pull request with your changes\n\nThanks for considering contributing tests to this library!\n\n## License\nThis project is licensed under the terms of the MIT license. See the LICENSE file for more information.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python library for interacting with the Last.fm API asynchronously.",
"version": "0.0.5",
"project_urls": {
"Homepage": "https://github.com/NachABR/async-fm",
"Repository": "https://github.com/NachABR/async-fm.git"
},
"split_keywords": [
"python",
"lastfm",
"aiohttp",
"async"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "41a1bdc179f6bc2fac0ea659f64bc126e2c68cb7d293316d8b6fc088f2b634c9",
"md5": "fd52b35ca7bf23554dd83c7e8660b14d",
"sha256": "aaaa82f84bdd7d917f1acfe47b09c73ad0a6d23718c939d0ef7cca2ac354914b"
},
"downloads": -1,
"filename": "async_fm-0.0.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fd52b35ca7bf23554dd83c7e8660b14d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10,<4.0",
"size": 7548,
"upload_time": "2023-06-15T23:39:21",
"upload_time_iso_8601": "2023-06-15T23:39:21.627262Z",
"url": "https://files.pythonhosted.org/packages/41/a1/bdc179f6bc2fac0ea659f64bc126e2c68cb7d293316d8b6fc088f2b634c9/async_fm-0.0.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "71f46746a842ae25f4b1d6c3851d667fd0e3c389a82e0962cbc02df4f0c85948",
"md5": "444f2fd4d0fdca8bf9666d00236a04d6",
"sha256": "51bf2b167568316f4a828786510a0f639c3c106e0ac5a3d14859162d5690a627"
},
"downloads": -1,
"filename": "async_fm-0.0.5.tar.gz",
"has_sig": false,
"md5_digest": "444f2fd4d0fdca8bf9666d00236a04d6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10,<4.0",
"size": 6901,
"upload_time": "2023-06-15T23:39:22",
"upload_time_iso_8601": "2023-06-15T23:39:22.919899Z",
"url": "https://files.pythonhosted.org/packages/71/f4/6746a842ae25f4b1d6c3851d667fd0e3c389a82e0962cbc02df4f0c85948/async_fm-0.0.5.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-06-15 23:39:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "NachABR",
"github_project": "async-fm",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "async-fm"
}