Skip to main content

Python wrapper for Genius API

Project description

genius.py

PyPI version Python 3.x version Documentation Downloads

Python wrapper for Genius API

With genius.py, enjoy an easy-to-use interface to interact with Genius API

Table of Contents


Features

  • Feature rich interface
  • Easy to use
  • Lyrics web scraper

Install

pip install geniusdotpy

Getting Started

To get started...

  1. Get your Client Access Token here

  2. Create a new Genius object

    from geniusdotpy.genius import Genius
    
    # Get your client access token from https://genius.com/api-clients
    client_access_token = "token"
    
    # Create a GeniusBuilder object
    genius = Genius(client_access_token=client_access_token)
    
    # Search for a track by ID
    track1 = genius.search_track_by_id(378195)
    print(repr(track1))
    
    # Search artist by ID
    artist1 = genius.search_artist(track1.artist.id)
    print(repr(artist1))
    
    # Search for a track by query
    track3 = genius.search("Beat It")[0]
    print(repr(track3))
    
    # Search tracks by artist
    tracks: list[Track] = genius.search_track_by_artist(artist_id=16775)
    track4 = tracks[0]
    print(repr(track4))
    
    # Retrieve lyrics
    track4.get_lyrics()
    print(track4.lyrics)
    
  3. ???

  4. Profit

References

Genius API


Created with 💖 by jjoeldaniel

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

geniusdotpy-1.1.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

geniusdotpy-1.1.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file geniusdotpy-1.1.1.tar.gz.

File metadata

  • Download URL: geniusdotpy-1.1.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for geniusdotpy-1.1.1.tar.gz
Algorithm Hash digest
SHA256 2c339e550bd0f519f25fe1fd264540d6d1165665db6ba83186e40856b0fa44ff
MD5 d055f1b1e2cc4763491a7a699b50c08e
BLAKE2b-256 a3ec4a9dbd5bedb6a1a527fb0360dd501a1e00abf6433391c2ecaa64f452c18c

See more details on using hashes here.

File details

Details for the file geniusdotpy-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: geniusdotpy-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for geniusdotpy-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ef20ecffc414c275e7db8f8ab7c217e98f696ef662b92d619b38664bf1142e73
MD5 61513893d7a56571083a061f8f34c5a6
BLAKE2b-256 0e3bcd7dbc8a4c3a0a5fc4be2fd6a2d831d4061af5db4d04420a3b0bb63b8b51

See more details on using hashes here.

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