python wrapper for the lrclib.net api
Project description
LRCLibAPI
Python Wrapper for lrclib.net api to get synced lyrics.
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)
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.2.tar.gz
(6.1 kB
view details)
Built Distribution
File details
Details for the file lrclibapi-0.2.2.tar.gz
.
File metadata
- Download URL: lrclibapi-0.2.2.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.0 Linux/6.2.0-1015-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2387bca87a4798e11adc0fb3fda15e2f13e0fcc8afd658049d8f65e91a57723f |
|
MD5 | 5c2b7dfe569d4d6b6da8b9fce5eadda8 |
|
BLAKE2b-256 | 7a1df6e381bc5041ab5977e3f3c52a770b81050784c87c2c20e9d21e54fbf69d |
File details
Details for the file lrclibapi-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: lrclibapi-0.2.2-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.0 Linux/6.2.0-1015-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 405baa1937a4d63a540dbd3bafbd4f288c22429bc3690e101b23501efcd36a22 |
|
MD5 | 6b92add58bb8a6eb968822a291546a0a |
|
BLAKE2b-256 | 7bee9355cf82b7bebd301b73b3666a023ad0465c01fdcf9385eeeb47edf058ec |