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 lrclibapi

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.synced_lyrics or lyrics.plain_lyrics)

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

# Print the results
for result in results:
    print(f"{result.artist_name} - {result.track_name} ({result.album_name})")

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

# Print the lyrics
print(lyrics.synced_lyrics or lyrics.plain_lyrics)

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.2.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

lrclibapi-0.2.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lrclibapi-0.2.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.0 Linux/6.2.0-1012-azure

File hashes

Hashes for lrclibapi-0.2.0.tar.gz
Algorithm Hash digest
SHA256 3c0c9d87a9cae765e3e3d8f9845cad712470c88ca888be74eb1ac61d9ad7bb86
MD5 48dc6caa1af4e567671a562c4c566ef1
BLAKE2b-256 2be1342bcf01c2491418493a295f9d5dfb71ac32637c6d4a69a12be159d8786f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lrclibapi-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.0 Linux/6.2.0-1012-azure

File hashes

Hashes for lrclibapi-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab1f65c5b8874562f6b62e3277b03bf913ce746f2b6f17b6a8a291913c563238
MD5 461ba90819ad5647471b4455a0f4d150
BLAKE2b-256 e1ff0d9831c786df2fde1282401f355610dd895c19d2d794572d3e802cd4e8e3

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