PyLyrics: A Pythonic Implementation of lyrics.wikia.com
PyLyrics is a python module to get Lyrics of songs from lyrics.wikia.com. It has support for getting albums of a singer and songs from an album from which lyrics can be accessed.
Installation
Installation is done using pip.
pip install PyLyrics
Usage
PyLyrics provides various lyrics.wikia.com methods by using many layers of Abstraction. Firstly there are 3 core classes which define most of the return values of PyLyrics:
Track: Returned in Album Track searches and contains methods to get lyrics of the track
Album: Returned from Artist album searches and contains methods to get tracks
Artist: Returned from Artist searches and contains methods to get Albums
Some examples are shown below on usage:
Search for a Artist and list Albums
from PyLyrics import *
albums = PyLyrics.getAlbums(singer='Eminem')
for a in albums:
print (a) #Each album printed is a Album Object
List all tracks of an Album
You need to pass a Album Object into the function. This step is required to prevent errors and to ensure result
from PyLyrics import *
albums = PyLyrics.getAlbums(singer='Eminem')
myalbum = albums[4] #Select your album based on Index
tracks = myalbum.tracks() #or PyLyrics.getTracks(myalbum)
for track in tracks:
print (track) #Each track is a track object
print (track.getLyrics()) #Get the lyrics
Get Lyrics of a song
There are two ways to do this. Either you can pass the name of the singer and the song name to the main function or use the bound method getLyrics() of the track object received as shown in the previous example.
from PyLyrics import *
print(PyLyrics.getLyrics('Taylor Swift','Blank Space')) #Print the lyrics directly
Version 1.1
Fixed a lot encoding errors and inconsistency
About
Created by Pradipta (geekpradd), Copyright 2015.
Metadata
Release files for PyLyrics 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| PyLyrics-1.1.0.zip | 7.0 kB | Without provenance | Details for PyLyrics-1.1.0.zip |
Release files / PyLyrics-1.1.0.zip
| Download URL | PyLyrics-1.1.0.zip |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c5f36e8ef0ed3b487a9242ce34c19f9684e418a5bbffd5d367dc1d1604b4cd0b
|
|
BLAKE2b-256 checksum How to use checksums |
9d748e92322cb1425739849eb719c3b5d8ca05a6b1f027829fd56b4db7c4b7c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for PyLyrics 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.