Skip to main content

Asynchronous version of the `py-deezer` module

Project description

deezer-asy

Asynchronous version of the py-deezer module At the moment, the functionality does not completely repeat the original library

Differences

This version is asynchronous. Otherwise, it repeats the arguments of the original library.

Last update 2.0.0

* Simplified module initialization
* Changed response type of `download_track` function: {'track': path, 'lyric': path or None}

What works?

  • Getting information about albums, playlists, artists, tracks (their tags).
  • Downloading tracks.

What needs to be done

  • Adding tags to .flac. (So ​​far, idling)

Installation

pip install pydeezer-asy

Usage as a package

from deezer_asy import DeezerAsy
import asyncio
import logging

logging.basicConfig(
    level=logging.INFO,  
    format="%(asctime)s [%(levelname)s] %(message)s",
    datefmt="%Y-%m-%d %H:%M:%S"
)
logger = logging.getLogger("main_logger")
loop = asyncio.get_event_loop()
ARL = "edit this"

async def main():
    # You can pass `loop` as an argument, or leave None
    # If you want logging, pass the `logger` as an argument
    deezer = DeezerAsy(ARL, loop=loop, logger=logger)
    await deezer._generate_main_session()
    track = await deezer.get_track(1421388612, True)
    data = await deezer.download_track(track['info'], './', with_lyrics=True, with_metadata=True)
    print(data)



if __name__ == "__main__":
    loop.run_until_complete(main())

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

pydeezer_asy-2.0.0.tar.gz (11.6 kB view details)

Uploaded Source

File details

Details for the file pydeezer_asy-2.0.0.tar.gz.

File metadata

  • Download URL: pydeezer_asy-2.0.0.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for pydeezer_asy-2.0.0.tar.gz
Algorithm Hash digest
SHA256 94f24ee00792cf1048ba70d45f17fa90f802e90ca314cb1073a3cec1cf7a48b5
MD5 c495ffbe474790963c3d6a28a261dc41
BLAKE2b-256 c66d04f95b906259629d2c9f991554843a74adc7b7cb6321eda8711e504ba21f

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