BLyrics’s documentation!
BLyrics
BLyrics is a python client for leveraging the GENIUS API.
A CLI tool for interacting with Genius
It is also used for getting latest articles and song charts
Package features include
Getting infomation
Songs
Artists
Lyrics
Annotations
Saving prefrences
Artist Info
Song info and lyrics
Latest information and articles
Headliner from genius.com
Oher articles
Charts
Requirements
Python3
Any Operating system
An open mind
Installation
Install from PyPi
$ pip3 install blyrics
Functions
search_song(song)
For getting song info and lyrics - Params: - song: song title - Returns: - dict: a dictionary of song information and lyrics
Usage:
>>>from blyrics import Package
>>>Package = Package()
>>>
>>>song_info = Package.search_song(song='No Role Modelz')
>>>
>>>song_lyrics = song_info['Lyrics']
>>>print(song_lyrics)
save_song(song_info)
For saving song info - Params: - song_info: value returned by search_song
>>>Package.save_song(song_info = song_info)
Saving Complete...
>>>
search_artist(artist)
For getting artist info - Params: - artist: artist name - Returns: - dict: a dictionary of artist information
Usage:
>>>artist_info = Package.search_artist(artist='Cole')
>>>twitter = artist_info['Twitter Handle']
>>>print(twitter)
save_artist(artist_info)
For saving artist info - Params: - artist_info: value returned by search_artist
>>>Package.save_artist(artist_info=artist_info)
Saving Complete...
>>>
get_annotations(song_id)
For getting song annotations - Params: - song_id: song id gotten from search_song - Returns: - annotations: list of annotations and other important information
Usage:
>>>song_id = song_info['song_id']
>>>annotations = Package.get_annotations(song_id=song_id)
get_articles_links():
For getting links and titles of articles currently on the genius home page - Returns: - tuple: headliner and other articles
Usage:
>>>articles = Package.get_articles_links()
>>>print(aritcles)
get_article(link)
“””For getting an articles currently on the genius home page - Params: - link: article link gotten from get_article_links - Returns: - str: article content
Usage:
>>>headline = articles[0]
>>>links = [v for v in headline.values()]
>>>article = Package.get_article(link=links[0])
>>>print(article)
get_chart()
For getting chart of top trending songs - Returns: - tuple: ranks, song title and artist name
>>>chart = Package.get_chart()
>>>for i in range(len(chart[0])):
... print(chart[0][i],' ',chart[1][i],' ',chart[2][i])
Contribute
Source Code: https://github.com/BlankGodd/BLyrics
License
Project licensed under the MIT license
Metadata
Release files for blyrics 1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| blyrics-1.1.tar.gz | 72.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| blyrics-1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 88.3 kB
Release files / blyrics-1.1.tar.gz
| Download URL | blyrics-1.1.tar.gz |
|---|---|
| Size | 72.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
774dd82fe22f2614be946b316c0569fe5688149f3cd313326a2d6d0512945cee
|
|
BLAKE2b-256 checksum How to use checksums |
d01dade231af727b518c271f6d494a24c44d3d248df9d1e6aa8708269eb3e242
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8
|
Release files / blyrics-1.1-py3-none-any.whl
| Download URL | blyrics-1.1-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ea5e4b62cb8ac953bf512d0998ba6b03d5cb2bbf1bccc59abe62b93bb8a9c7f3
|
|
BLAKE2b-256 checksum How to use checksums |
a8e7401bfa06936086f4fc7d2b4e5ec627823eed6691b7e2cb5d911aa7167a4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8
|