{"id":15372595,"url":"https://github.com/jkbrzt/lastfmclient","last_synced_at":"2025-04-15T12:31:42.631Z","repository":{"id":7076900,"uuid":"8364842","full_name":"jkbrzt/lastfmclient","owner":"jkbrzt","description":"Python client for the Last.fm API. Non-blocking client for Tornado included.","archived":false,"fork":false,"pushed_at":"2019-10-03T22:26:34.000Z","size":71,"stargazers_count":23,"open_issues_count":3,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-28T21:12:10.462Z","etag":null,"topics":["api-client","async","client","jakubroztocil","lastfm","lastfm-api","python","tornado"],"latest_commit_sha":null,"homepage":"https://twitter.com/jakubroztocil","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jkbrzt.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-22T20:02:50.000Z","updated_at":"2022-08-13T15:37:48.000Z","dependencies_parsed_at":"2022-09-15T16:41:57.684Z","dependency_job_id":null,"html_url":"https://github.com/jkbrzt/lastfmclient","commit_stats":null,"previous_names":["jkbrzt/lastfmclient","jakubroztocil/lastfmclient"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkbrzt%2Flastfmclient","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkbrzt%2Flastfmclient/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkbrzt%2Flastfmclient/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jkbrzt%2Flastfmclient/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jkbrzt","download_url":"https://codeload.github.com/jkbrzt/lastfmclient/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249072268,"owners_count":21208150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-client","async","client","jakubroztocil","lastfm","lastfm-api","python","tornado"],"created_at":"2024-10-01T13:52:09.765Z","updated_at":"2025-04-15T12:31:42.400Z","avatar_url":"https://github.com/jkbrzt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"``lastfmclient``\n################\n\nPython client for the `Last.fm API \u003chttp://www.last.fm/api\u003e`_ with a\npythonic interface. Also includes an async variant of the client for\n`Tornado \u003chttps://github.com/facebook/tornado\u003e`_.\n\n\nUsage\n=====\n\nRegular\n-------\n\n.. code-block:: python\n\n    from lastfmclient import LastfmClient\n\n    api = LastfmClient(\n        api_key=KEY,\n        api_secret=SECRET,\n        session_key=session_key\n    )\n\n    resp = api.track.update_now_playing(\n        track='Paranoid Android',\n        artist='Radiohead',\n        album='OK Computer',\n    )\n\n    print resp\n\n\nAsynchronous (uses ``tornado.httpclient.AsyncHTTPClient``)\n----------------------------------------------------------\n\n.. code-block:: python\n\n    import tornado.web\n    import tornado.gen\n    from lastfmclient.async import AsyncLastfmClient\n\n    class Scrobbler(tornado.web.RequestHandler):\n\n        @tornado.gen.coroutine\n        def post(self):\n            api = AsyncLastfmClient(\n                api_key=KEY,\n                api_secret=SECRET,\n                session_key=session_key\n            )\n\n            resp = yield api.track.update_now_playing(\n                track='Paranoid Android',\n                artist='Radiohead',\n                album='OK Computer',\n            )\n            self.finish(resp)\n\n\nSee also `examples \u003chttps://github.com/jakubroztocil/lastfmclient/tree/master/examples\u003e`_.\n\n\nClient methods\n==============\n\nAll the methods the Last.fm API provides are mirrored in the client with\nrich docstrings and arguments description. This code is actually generated\ndirectly from the online API documentation pages\n(see ``./generate.py``, ``./api.json``, and ``./lastfmclient/api.py``).\n\nThe defined methods be updated to the current version of the documentation via:\n\n\n.. code-block:: bash\n\n    $ pip install -r requirements.txt lxml\n\n    # 1. Generate fresh api.json from docs at http://www.last.fm/api:\n    $ make spec\n\n    # 2. Generate `lastfm/api.py` from `api.json`:\n    $ make code\n\n    # Or, all the above in one step:\n    $ make\n\n\nContact\n=======\n\nJakub Roztočil\n\n* https://github.com/jakubroztocil\n* https://twitter.com/jakubroztocil\n* https://roztocil.co\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkbrzt%2Flastfmclient","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjkbrzt%2Flastfmclient","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjkbrzt%2Flastfmclient/lists"}