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["syncedLyrics"])
# Search for a lyrics
results = api.search_lyrics(
track_name="I Want to Live",
)
# 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(lrclib_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.3.tar.gz
(4.6 kB
view details)
Built Distribution
File details
Details for the file lrclibapi-0.1.3.tar.gz
.
File metadata
- Download URL: lrclibapi-0.1.3.tar.gz
- Upload date:
- Size: 4.6 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c821cb6ecb2b2508d435ececad22064b0e5a14529b9cef99fd9635f7f9610e9 |
|
MD5 | 6196c209c086d2d8266f49a242456117 |
|
BLAKE2b-256 | a04ab2d9c8d64f24e4062c8c531aafea55d616447ba972a9954b4455103097ad |
File details
Details for the file lrclibapi-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: lrclibapi-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.5 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e3b0c163ceb691837a4c544528ecde8e81f4a6db87c0403edfff7f125828386 |
|
MD5 | 09649b38fd4cc59ea1393c73b51a0eaa |
|
BLAKE2b-256 | 4c798d402fe82da26bef01aee03aa5ecada6e1639133d8ca1fdd209bde61f055 |