Skip to content

twitch0001/lastfm-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lastfm-py

An asynchronous Python Last.FM API wrapper

Installation

This project will be on PyPi once it is functional

Linux

python3 -m pip install -U lastfm-py

Windows

py -m pip install -U lastfm-py

Examples

Getting a user's recent scrobbles

import lastfm
import asyncio

client = lastfm.Client('client_key') # Replace with your client key (client_secret is optional)

async def main():
    recent_tracks = await client.user_get_recent_tracks("username", limit=5)
    print(recent_tracks[0].title) # prints the title of the users most recently scrobbled track
    
    await client.session.close() # don't forget to close the session once finished with everything

asyncio.run(main())

Changes

  • Version 0.0.18:
    • Made tagging_type a required parameter for user_get_personal_tags

TO-DO

A list of methods implemented can be found in API Methods

Next projects include:

  • Creating models for all the methods
  • Implement Auth methods
  • Implement the rest of the methods

About

An asynchronous Python Last.FM API wrapper

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages