This release is a pre-release and may not be stable for production use.
lastfmclient
Python client for the Last.fm API with a pythonic interface. Also includes an async variant of the client for Tornado.
Usage
Regular
from lastfmclient import LastfmClient
api = LastfmClient(
api_key=KEY,
api_secret=SECRET,
session_key=session_key
)
resp = api.track.update_now_playing(
track='Paranoid Android',
artist='Radiohead',
album='OK Computer',
)
print resp
Asynchronous (uses tornado.httpclient.AsyncHTTPClient)
from lastfmclient import AsyncLastfmClient
def callback(resp):
print resp
api = AsyncLastfmClient(
api_key=KEY,
api_secret=SECRET,
session_key=session_key
)
api.track.update_now_playing(
track='Paranoid Android',
artist='Radiohead',
album='OK Computer',
callback=callback,
)
See also examples.
Client methods
All the methods the Last.fm API provides are mirrored in the client with rich docstrings and arguments description. This code is actually generated directly from the online API documentation pages (see ./generate.py, ./api.json, and ./lastfmclient/api.py).
The defined methods be updated to the current version of the documentation via:
$ pip install -r requirements.txt lxml
# 1. Generate fresh api.json from docs at http://www.last.fm/api:
$ make spec
# 2. Generate `lastfm/api.py` from `api.json`:
$ make code
# Or, all the above in one step:
$ make
Metadata
Release files for lastfmclient 0.0.1-alpha
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lastfmclient-0.0.1-alpha.tar.gz | 17.8 kB | Without provenance | Details for lastfmclient-0.0.1-alpha.tar.gz |
Release files / lastfmclient-0.0.1-alpha.tar.gz
| Download URL | lastfmclient-0.0.1-alpha.tar.gz |
|---|---|
| Size | 17.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
66c7104cb52de3fe46901ca6eeec296af3577c1bf2d71d24ca9c2ee62d92190c
|
|
BLAKE2b-256 checksum How to use checksums |
8938d29c18fbb45f628c1776ae1abe2b6bdeac68d9914fa8d2f53d6ff0eece28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for lastfmclient 0.0.1-alpha
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.