Wrapper for chartlyrics api: http://api.chartlyrics.com
Project description
ChartLyrics API
This is a simple wrapper for: http://api.chartlyrics.com. You can search for songs, artists and get the lyrics.
Installation
pip install chartlyrics
Usage Example
from chartlyrics import ChartLyricsClient
client = ChartLyricsClient()
for song in client.search_text("starts with one"):
if "park" in song.artist.lower():
print(song.artist) # Linking Park
print(song.lyrics) # Starts with one\n One thing I dont know why...
You can also use song.lyrics_object
which will return a Lyrics
object that you can index strophes and verses on:
lyrics = song.lyrics_object
print(lyrics[0][-1]) # first strophe last verse
Check the tests
for more examples.
Development
Fork the repo, run:
poetry install
Add features, write tests, run:
poetry run pytest
Create a Pull request.
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
chartlyrics-0.1.7.tar.gz
(4.1 kB
view details)
Built Distribution
File details
Details for the file chartlyrics-0.1.7.tar.gz
.
File metadata
- Download URL: chartlyrics-0.1.7.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.15 Linux/5.15.0-1057-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab23840a2182ed3f6d1bc552c5f100acb133d4cfcf975decfd6fb55bd303d5ee |
|
MD5 | 0736a7c956337f8a6ae991586cd25d8f |
|
BLAKE2b-256 | fe6329958e67265bcfbb464cb62db4fb57591ed5deeaed3a0a12c747e87ba39f |
File details
Details for the file chartlyrics-0.1.7-py3-none-any.whl
.
File metadata
- Download URL: chartlyrics-0.1.7-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.15 Linux/5.15.0-1057-aws
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0604add10cb1057ac3bfc57dd4ea6e9893f157041beb862ce7e118ca49b24182 |
|
MD5 | 5410bfe447702fc994e27d479c005123 |
|
BLAKE2b-256 | 191e3146d474eb511300f8b38bb1be11f175a6fea0a2afa8ca28c6be5361c194 |