Skip to content

OkoyaUsman/deezer-python

 
 

Repository files navigation

Deezer Python Client

CI Status Documentation Status Test coverage percentage

uv Ruff pre-commit

Launch demo on Binder PyPi Status pyversions license LoC


Documentation: https://deezer-python.readthedocs.io

Source Code: https://github.com/browniebroke/deezer-python


A friendly Python wrapper around the Deezer API.

Installation

The package is published on PyPI and can be installed by running:

pip install deezer-python

Basic Use (synchronous)

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'

Async usage

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_deezer package inside this project so it does not change the public API of deezer-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.

Contributors

Bruno Alla
Bruno Alla

💻 📖 🤔 🚧 📦 ⚠️
misuzu
misuzu

💻 📖 🤔 ⚠️
Pascal
Pascal

💻 ⚠️
khamaileon
khamaileon

📖
Nikolay Sheregeda
Nikolay Sheregeda

💻 ⚠️
Matheus Horstmann
Matheus Horstmann

💻 📖
Kieran Wynne
Kieran Wynne

💻
Jonathan Virga
Jonathan Virga

💻 📖
Hugo
Hugo

💻
allcontributors[bot]
allcontributors[bot]

🚇
nrebena
nrebena

🐛 💻 ⚠️
Pavel
Pavel

🐛
Samuel Gaist
Samuel Gaist

💻 ⚠️ 🛡️
Thomas Morelli
Thomas Morelli

🐛 💻 🤔
Naveen M K
Naveen M K

💻 🚇
Carababusha
Carababusha

💻
Bertrand Jacquin
Bertrand Jacquin

💻
Pierre
Pierre

💻 📖
Jonathan
Jonathan

💻 📖 ⚠️
Thomas Dambrin
Thomas Dambrin

🐛

This project follows the all-contributors specification. Contributions of any kind are welcome!

About

Deezer client for python

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 95.8%
  • Jupyter Notebook 4.0%
  • JavaScript 0.2%