</> Zhlyr Documentation

Install Zhlyr

~💲pip install zhlyr

Recognize track

# Get full track json response object info

import asyncio
from zhlyr import Reconize
data = '/root/user/dir/simple.mp3'
async def get_info():
  reco = await Reconize(data)
  print(reco.json())
loop = asyncio.new_event_loop()
loop.run_until_complete(get_info)

# You can get response info as string response 
reco = Reconize(data)
print(reco.text)

Get the lyrics of the track

Get lyrics from title of the track

from zhlyr import ZhLyr
lyrics = ZhLyr.GetByTitle(title='save your tears', srt=False)

for time, lyric in lyrics.items():
  print(f'time {time} >>> lyric: {lyric}')

Get lyrics from details of track

lyrics = ZhLyr.GetByDetails(title='save your tears', artist='the weeknd', duration='3:35', srt=False)

for time, lyric in lyrics.items():
  print(f'time {time} >>> lyric: {lyric}')

How to use data serialization

Serialized data from response

from zhlyr import Serializer
data = your_json_data
serialize = Serializer(data)
print(serialize)

Get value from key with serialized data

data = {'key1': 'hello world!'}
serialize = Serializer(data)
print(serialize.key1)

My Accounts