Skip to main content

Python library for music handling

Project description

  • What is zhlyr?

  • A python library aimed at music enthusiasts, providing tools for managing and discovering music, fetching song lyrics, and utilizing machine learning algorithms to predict the name of a song from a short audio snippet.

  • Code Area :

    ⏬Install Zhlyr
    💲pip install zhlyr
    

    🎵 Recognize track
    Recognize a track based on a file
    # Get full track json response object info
    
    import asynico
    from zhlyr import Reconize
    data = '/root/user/dir/simple.mp3'
    async def get_info():
      reco = await Reconize(data)
      print(reco.json())
    loop = asynico.new_event_loop()
    loop.run_until_complete(get_info)
    
    # You can get respnose info as string response 
    reco = Reconize(data)
    print(reco.text)
    

    🔍🎼 Get the lyrics of the track

    Get lyrics from title of the track </br>

    from zhlyr import ZhLyr
    lyrics = ZhLyr.GetByTitle(title='save your trears',srt=false)
    # :GetByTitle: `title`: str : title of the track to get trrack from it.
    # :GetByTitle: `srt`: bool : if `true` he will return time as `srt` format.
    # :GetByTitle: return json object
    
    for time , lyric in lyrics.items():
      print(f'time {time} >>> lyric : {lyric}')
    

    Get lyrics from details of track </br>

    lyrics = ZhLyr.GetByDetails(title='save your trears',artist='the weeknd',duration='3:35',srt=false)
    # :GetByDetails: `title`: str : title of the track to get trrack from it.
    # :GetByDetails: `artist`: str : artist of the track to get lyrics from it.
    # :GetByDetails: `duration` : Optional[str]=None : duration of the track to get lyrics from it.
    # :GetByDetails: `srt`: bool : if `true` he will return time as `srt` format.
    # :GetByDetails: return json object
    
    for time , lyric in lyrics.items():
      print(f'time {time} >>> lyric : {lyric}')
    

    ℹ️ How to use data serialization

    Serialized data from response. </br>

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

    Get vlue from key with serialized data. </br>

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

My Accounts


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

zhlyr-5.1-py2.py3-none-win_amd64.whl (761.8 kB view hashes)

Uploaded Python 2 Python 3 Windows x86-64

zhlyr-5.1-py2.py3-none-win32.whl (383.0 kB view hashes)

Uploaded Python 2 Python 3 Windows x86

zhlyr-5.1-py2.py3-none-manylinux2014_x86_64.whl (1.5 MB view hashes)

Uploaded Python 2 Python 3

zhlyr-5.1-py2.py3-none-manylinux1_x86_64.whl (1.1 MB view hashes)

Uploaded Python 2 Python 3

zhlyr-5.1-py2.py3-none-macosx_10_9_x86_64.whl (1.9 MB view hashes)

Uploaded Python 2 Python 3 macOS 10.9+ x86-64

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