
Security News
MCP Community Begins Work on Official MCP Metaregistry
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Python client for the Last.fm API with a pythonic interface to all methods, including auth, etc. An async, Tornado-based client included as well.
lastfmclient
################
Python client for the Last.fm API <http://www.last.fm/api>
_ with a
pythonic interface. Also includes an async variant of the client for
Tornado <https://github.com/facebook/tornado>
_.
.. code-block:: python
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
tornado.httpclient.AsyncHTTPClient
).. code-block:: python
import tornado.web
import tornado.gen
from lastfmclient.async import AsyncLastfmClient
class Scrobbler(tornado.web.RequestHandler):
@tornado.gen.coroutine
def post(self):
api = AsyncLastfmClient(
api_key=KEY,
api_secret=SECRET,
session_key=session_key
)
resp = yield api.track.update_now_playing(
track='Paranoid Android',
artist='Radiohead',
album='OK Computer',
)
self.finish(resp)
See also examples <https://github.com/jakubroztocil/lastfmclient/tree/master/examples>
_.
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:
.. code-block:: bash
$ 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
Jakub Roztočil
FAQs
Python client for the Last.fm API with a pythonic interface to all methods, including auth, etc. An async, Tornado-based client included as well.
We found that lastfmclient demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The MCP community is launching an official registry to standardize AI tool discovery and let agents dynamically find and install MCP servers.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.