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["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.2.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

lrclibapi-0.1.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lrclibapi-0.1.2.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

Hashes for lrclibapi-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5def16d5e4cb44638b16d911907a7cbd09a9b528520312e06d21cc3acbe12b62
MD5 fbd7d23cc18d06e83d3831332ba33b84
BLAKE2b-256 a085e10c7e407423589bdc2f3eb6471123f7ee31a56f813a973ae9352bffe89e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lrclibapi-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.4 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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b7c2bb359d3e8d21632780b97d1d19034943dee5123fe196c97e55ce8302a0df
MD5 2e0b1ede92a5ac0f03a008f4b92f24d6
BLAKE2b-256 4f56844adfa00e3a775a681a33214ee933c68332aac3ea6aa82000d55d374d22

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