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)
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.1.tar.gz
(6.0 kB
view details)
Built Distribution
File details
Details for the file lrclibapi-0.2.1.tar.gz
.
File metadata
- Download URL: lrclibapi-0.2.1.tar.gz
- Upload date:
- Size: 6.0 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 | ca2ea1a54403460e1193caa00bd2a2a1decc342bc62e07e7ec0e15f56ceb87be |
|
MD5 | 7df8e0199c60c3517f6053b2d6375669 |
|
BLAKE2b-256 | ba2b93084f84933e673394f5c4b5746fb023ff724975a6d6446e15c32a1f6a87 |
File details
Details for the file lrclibapi-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: lrclibapi-0.2.1-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-1012-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab72579ceb1ece53c148edddf8d042bfd932258255a8fff45a2c674c8681817f |
|
MD5 | c05a6b79c474413372bc5db5625d246a |
|
BLAKE2b-256 | 2e47b6eef571467e96196a1841091032f2588bbecaeee43353d18dd70dc2d0e5 |