Skip to content

Python/Pandas wrapper for lastFM API to explore or export user data

License

Notifications You must be signed in to change notification settings

delannoy/lastfm-explorer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lastfm-explorer

Python wrapper for lastFM API to explore and/or export user data.

setup

A LastFM API key is required for most API methods (can be obtained here).

usage examples

from api import *

sum(album.getInfo(artist='tool', album='undertow').tracks.track.duration)
# 3958

artist.getTopTags(artist='the contortionist').tag[:4].name.to_list()
# ['deathcore', 'Progressive deathcore', 'Progressive metal', 'experimental']

artist.getSimilar(artist='rivers of nihil', limit=4).artist.name.to_list()
# ['Black Crown Initiate', 'Allegaeon', 'Archspire', 'Fallujah']

geo.getTopArtists(country='germany', limit=4).artist.name.to_list()
# ['Queen', 'Coldplay', 'Red Hot Chili Peppers', 'David Bowie']

user.getTrackScrobbles(artist='opeth', track='ghost of perdition', limit=4).track.date.dateTime.to_list()
# ['2022-10-14T13:19:00', '2022-07-20T11:12:00', '2022-05-01T03:21:00', '2022-03-29T14:42:00']

playcount = int(user.getInfo().playcount)
user.getRecentTracks(limit=1, page=playcount).track.date.dateTime[-1]
# '2007-11-04T20:07:00'

About

Python/Pandas wrapper for lastFM API to explore or export user data

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages