Skip to main content

A Python wrapper around the Genius API for large scale applications

Project description

fastgenius



Code style: black

Installation

pip install fastgenius

Usage

>>> import fastgenius
>>> genius = fastgenius.Genius('client_access_token')

>>> genius.get_artist('Madonna')
Artist(Madonna)

>>> genius.get_artist('Madona')
Artist(Madona (DLamotta))

>>> genius.get_artist(['Madonna', 'TuPac'])
{'Madonna': Artist(Madonna), 'TuPac': Artist(2Pac)}

>>> artists = genius.get_artist(['Madonna', 'TuPac'])
>>> artists['Madonna'].songs
[]

>>> artists = genius.get_artist(['Madonna', 'TuPac'], get_songs=True)
>>> artists['Madonna'].songs
[Song(Madonna - Into the Groove (Extended Remix)),
 Song(Leo The Kind - Material Girl),
 Song(Madonna - Masterpiece - MDNA World Tour / Live 2012),
 Song(Genius Polska Tłumaczenia - Madonna & Quavo - Future),
 ...]

>>> artists['Madonna'].songs[0].lyrics
"\\nAnd you can dance\\nFor inspiration\\nCome on\\nI'm waiting\\nCome, ..."

>>> big_syke = genius.get_artist('Big Syke', get_songs=True)
>>> len(big_syke.songs)
78

>>> big_syke = genius.get_artist('Big Syke', get_songs=True, primary_artist_only=True)
>>> len(big_syke.songs)
17

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastgenius-0.0.3.tar.gz (27.0 kB view hashes)

Uploaded Source

Built Distribution

fastgenius-0.0.3-py3-none-any.whl (51.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page