A Python wrapper around the Genius API for large scale applications
Project description
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 (D’Lamotta))
>>> 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
Release history Release notifications | RSS feed
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)
Built Distribution
fastgenius-0.0.3-py3-none-any.whl
(51.1 kB
view hashes)
Close
Hashes for fastgenius-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f70f1e831397fb0acae529b4cce0013760254ab116185028f7bbfe929f0d361c |
|
MD5 | 8f3727db29e792ee1c0b3e0740e2a84d |
|
BLAKE2b-256 | b47ae252ee5e91b6a7ae37542631b5dd0caac17db4dcb83597091b3e14989f79 |