Skip to main content

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.2.5

  • Simplified module initialization
  • Changed response type of download_track function: {'track': path, 'lyric': path or None}
  • Added httpx support to replace aiohttp*. Specify during initialization: DeezerAsy(ARL, _httpx=True)
  • Minor changes regarding cookies (Not sure but queries should work in both cases)
  • Fixed tags (load cover)
  • The module has two versions. Changes in both deal with bugs with aiohttp. More

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

General

You can pass `loop` as an argument, or leave None
If you want logging, pass the `logger` as an argument
  1. DeezerAsy - _httpx parameter during initialization. Replacing the module for asynchronous requests with httpx
  2. aioDeezer - The aio_session parameter on initialization. Pass an instance of aiohttp.ClientSession into it

Usage DeezerAsy

from deezer_asy import DeezerAsy
import logging
import asyncio


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

deezer = DeezerAsy(ARL, loop=loop, logger=logger, _httpx=True)

async def main():
    search_data = await deezer.search_tracks('post malone rockstar', 1)
    track_data = await deezer.get_track(search_data[0]['id'], False)
    download = await deezer.download_track(track_data['info'], './', with_lyrics=True, with_metadata=True)
    print(download)
    # Output: {'track': '.\\rockstar (feat. 21 Savage).mp3', 'lyruc': '.\\rockstar (feat. 21 Savage).lrc'}

    await deezer.close_session() # Closing session

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

Usage aioDeezer

from deezer_asy import aioDeezer
import logging
import asyncio


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

deezer = aioDeezer(ARL, loop=loop, logger=logger, aio_session=aio_session)

async def main():
    search_data = await deezer.search_tracks('post malone rockstar', 1)
    track_data = await deezer.get_track(search_data[0]['id'], False)
    download = await deezer.download_track(track_data['info'], './', with_lyrics=True, with_metadata=True)
    print(download)
    # Output: {'track': '.\\rockstar (feat. 21 Savage).mp3', 'lyruc': '.\\rockstar (feat. 21 Savage).lrc'}

    await deezer.close_session() # Closing session

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

Metadata

Release files for pydeezer-asy 2.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pydeezer-asy 2.2.6
File Size Uploaded Provenance Actions
pydeezer_asy-2.2.6.tar.gz 18.6 kB Without provenance Details for pydeezer_asy-2.2.6.tar.gz

Release files / pydeezer_asy-2.2.6.tar.gz

Download URL pydeezer_asy-2.2.6.tar.gz
Size 18.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e396a662be325a1a4a63cf2aa56e105888aedbadba24243b8f7b15e0e887e13a
BLAKE2b-256 checksum
How to use checksums
781e0e8bf2465cb60fd2fdefcfa3e9598ff0b113451f533cde3129d12a7f5fd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Security for pydeezer-asy 2.2.6

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page