Skip to main content

Python client for the GENIUS API - Also for getting latest articles and charts

Project description

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

  1. Getting infomation

  • Songs

  • Artists

  • Lyrics

  • Annotations

  1. Saving prefrences

  • Artist Info

  • Song info and lyrics

  1. Latest information and articles

  • Headliner from genius.com

  • Oher articles

  • Charts

Requirements

  1. Python3

  2. Any Operating system

  3. An open mind

Installation

  1. Setup virtual enviroment

  2. 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_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

License

Project licensed under the MIT license

Author

Project details


Release history Release notifications | RSS feed

This version

1.1

Download files

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

Source Distribution

blyrics-1.1.tar.gz (72.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blyrics-1.1-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file blyrics-1.1.tar.gz.

File metadata

  • Download URL: blyrics-1.1.tar.gz
  • Upload date:
  • Size: 72.5 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for blyrics-1.1.tar.gz
Algorithm Hash digest
SHA256 774dd82fe22f2614be946b316c0569fe5688149f3cd313326a2d6d0512945cee
MD5 02364fa9fb68bb957b9af117da1a1432
BLAKE2b-256 d01dade231af727b518c271f6d494a24c44d3d248df9d1e6aa8708269eb3e242

See more details on using hashes here.

File details

Details for the file blyrics-1.1-py3-none-any.whl.

File metadata

  • Download URL: blyrics-1.1-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for blyrics-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ea5e4b62cb8ac953bf512d0998ba6b03d5cb2bbf1bccc59abe62b93bb8a9c7f3
MD5 b22d22e6512760151f39db4a0631ca46
BLAKE2b-256 a8e7401bfa06936086f4fc7d2b4e5ec627823eed6691b7e2cb5d911aa7167a4d

See more details on using hashes here.

Supported by

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