Skip to main content

python wrapper for the lrclib.net api

Project description

LRCLibAPI

Python Wrapper for lrclib.net api to get synced lyrics.

Stable Version Downloads Test Code style: black Checked with mypy

Installation

pip install lrclibpy

Usage

from lrclib import LrcLibAPI

# Create an instance of the API
api = LrcLibAPI(user_agent="my-app/0.0.1")

# Get lyrics for a track
lyrics = api.get_lyrics(
  track_name="I Want to Live",
  artist_name="Borislav Slavov",
  album_name="Baldur's Gate 3 (Original Game Soundtrack)",
  duration=233,
)

# Print the lyrics
print(lyrics["syncedLyrics"])

# Search for a lyrics
results = api.search_lyrics(
  track_name="I Want to Live",
  duration=233,
)

# Print the results
for result in results:
  print(result["id"])
  print(result["artistName"])
  print(result["albumName"])

# Get lyrics by ID
lyrics = api.get_lyrics_by_id(lyrics_id=results[0]["id"])

# Print the lyrics
print(lyrics["syncedLyrics"] or lyrics["plainLyrics"])

Features in Development

  • Add cryptography challenge solver for posting lyrics

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

lrclibapi-0.1.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

lrclibapi-0.1.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file lrclibapi-0.1.1.tar.gz.

File metadata

  • Download URL: lrclibapi-0.1.1.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.11.0b1 Windows/10

File hashes

Hashes for lrclibapi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 40f7a49cc80b5ac8223d182b66ae5b333f8bac4a32f4e4b43a09b64826753f92
MD5 8d219eb6aab9d1a8296904cb1b6f99fd
BLAKE2b-256 77855a56da2c625f6fdadc714fa2d8172f4e47823050228b55d8117af01e2ba8

See more details on using hashes here.

File details

Details for the file lrclibapi-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: lrclibapi-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.1 CPython/3.11.0b1 Windows/10

File hashes

Hashes for lrclibapi-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 36d7edeb2f5b366a83929c76f4ede73b703ae3ecd498e5544a2c50acc8fee5dd
MD5 3dffa6b7ff4b0d851d8c6146b428e7b2
BLAKE2b-256 468f90f68f9e8dfc806d38bb55da0c65caaee67fdded6b8cb295656d4e9295ad

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