lastfmpy - Last.FM API wrapper written in Python
Maintained by Myer (also known as myerfire, MyerFire)
This library is an async wrapper for the last.fm API.
Features
- Currently, any API methods that do not require the authentication process are supported.
Installation
lastfmpy is available from the official pYpI package index.
python -m pip install -U lastfmpy
Documentation
- There are relevant docstrings on the functions of the main wrapper class.
- Object attribute documentation may (?) be worked on but the code in objects.py is easily readable.
- ****There is no API method for a user's currently playing song. The way to get the currently playing song of a user is
to request recent tracks and check whether the first index of the list has the attribute
playingset to true.
Quick Start
from lastfmpy import LastFM
import asyncio
API_KEY = "hahagetbaited"
# if it isn't obvious enough, replace this string
# with your API key obtained by going to https://last.fm/api/applications and creating an application
async def main():
lastfm = await LastFM(API_KEY)
recent = await lastfm.user.get_recent_tracks(user="myerfire")
print(f"{recent.items[0].name}")
if __name__ == "__main__":
asyncio.get_event_loop().run_until_complete(main())
Metadata
Release files for lastfmpy 1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lastfmpy-1.1.tar.gz | 8.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lastfmpy-1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.7 kB
Release files / lastfmpy-1.1.tar.gz
| Download URL | lastfmpy-1.1.tar.gz |
|---|---|
| Size | 8.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
550e8007ff5fd15278091c7be9a30a943360ca95fe837087bd7c509ae822703a
|
|
BLAKE2b-256 checksum How to use checksums |
8a42803af935fdbb224092d46aeb92ceaa79dd79dbdcab831fb1ce848ec6efdc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.23.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.2
|
Release files / lastfmpy-1.1-py3-none-any.whl
| Download URL | lastfmpy-1.1-py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3cef441c9bc36083b127f11f3c73c3e2e88b8fc63eb573f6cde9eac61e633fd6
|
|
BLAKE2b-256 checksum How to use checksums |
f2bedceeb428d3183cdf1170c6c4e144c24543f6814a63e282157930258c9f91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.23.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.2
|