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.2.0.tar.gz (11.9 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: pydeezer_asy-2.2.0.tar.gz
  • Upload date:
  • Size: 11.9 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.2.0.tar.gz
Algorithm Hash digest
SHA256 32f621c8a34a600cccd02ecbab7cef8bf85c8ab91287329636fa285ec5b67b0a
MD5 66b6e07c337bc5f44a71fb9ac76e411c
BLAKE2b-256 9fbe3c33dc570966b3a360314a9503f1d84f688dae8a217e7a761cd25a650c23

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