Documentation: https://deezer-python.readthedocs.io
Source Code: https://github.com/browniebroke/deezer-python
A friendly Python wrapper around the Deezer API.
The package is published on PyPI and can be installed by running:
pip install deezer-python
Easily query the Deezer API from your Python code. The data returned by the Deezer API is mapped to python resources:
>>> client = deezer.Client()
>>> client.get_album(680407).title
'Monkey Business'An asynchronous client is also available, built on top of httpx.AsyncClient.
It mirrors the public API of the synchronous deezer.Client, but all network
calls must be awaited and the client must be used in an async context.
import asyncio
from async_deezer import AsyncClient
async def main() -> None:
async with AsyncClient() as client:
album = await client.get_album(680407)
print(album.title)
asyncio.run(main())You can work with paginated endpoints using AsyncPaginatedList and async for:
from async_deezer import AsyncClient
async def main() -> None:
async with AsyncClient() as client:
tracks = client.get_user_tracks() # AsyncPaginatedList
async for track in tracks:
print(track.title)Notes:
- The async client lives in the separate
async_deezerpackage inside this project so it does not change the public API ofdeezer-python.
Ready for more? Look at our whole documentation on Read The Docs or have a play in a pre-populated Jupyter notebook on Binder.
This project follows the all-contributors specification. Contributions of any kind are welcome!