Skip to main content

Lyrics-Client

Get the lyrics of your favorite musics !

Features

  • Automatic lyrics fetching from different services
    • Currently supported : Genius, Musixmatch, AZLyrics
  • Title and artist verification to find the best match
  • Easy to use, straightforward interface
  • Extensive results information
  • Possible to use via DI integration

Installation

Pip

pip install lyrics-client

Poetry

Poetry is a Python dependency management and packaging tool. I actually use it for this project.

poetry add lyrics-client

Usage

There are 2 ways to use this library : using the LyricsClient object or via the DI.

Using LyricsClient

The library exposes the LyricsClient class. This class has 2 methods : get_lyrics and get_from_song.

Both methods do the same thing : fetching lyrics and returns the results in a list of FetchLyricsResult.

However, get_lyrics accept a FetchLyricsCommand object as parameter, while get_from_song accept a song title, the song artists and optionally the clients to use.

Example :

from lyrics_client import LyricsClient

client = LyricsClient()
results = client.get_from_song("in the end", "linkin park")

lyrics = results[0].lyrics

Using DI

The library also exposes a BaseLyricsClient interface and a add_lyrics_client function for Taipan-DI.

In this method, the clients are registered as a Pipeline. All you need to do is to resolve the pipeline and execute it.

Example :

from lyrics_client import BaseLyricsClient, add_lyrics_client, FetchLyricsCommand
from taipan_di import DependencyCollection

services = DependencyCollection()
add_lyrics_client(services)

provider = services.build()
client = provider.resolve(BaseLyricsClient)
request = FetchLyricsCommand("in the end", "linkin park")

results = client.exec(request)
lyrics = results[0].lyrics

Inspirations

This library is partially based on spotDL's spotify-downloader.

Download files

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

Source Distribution

lyrics_client-0.0.4.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

lyrics_client-0.0.4-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file lyrics_client-0.0.4.tar.gz.

File metadata

  • Download URL: lyrics_client-0.0.4.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.9.17 Linux/5.15.0-1041-azure

File hashes

Hashes for lyrics_client-0.0.4.tar.gz
Algorithm Hash digest
SHA256 9fe352420cc5664e3798257d250d9f76e50bee84766f9d3da3015607ef558aac
MD5 df98d0d8bfbeac5a21a8e46efffa78b8
BLAKE2b-256 ffefad7ddda378a020d949cadde3ebe137547107ba09a25edbce054e177f75f5

See more details on using hashes here.

File details

Details for the file lyrics_client-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: lyrics_client-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.9.17 Linux/5.15.0-1041-azure

File hashes

Hashes for lyrics_client-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 91bdf2cd6985d969d5e415d632b2d7d3878bcf06be34e6fb2412c03fe733dc7d
MD5 e13ac4bc6eab152f0ec93584cd5f4082
BLAKE2b-256 6fa02ad045d2883290888c988e09a39443bc9e75337b2d85e34b0f3083e6a740

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

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