Deezer python’s documentation

Python Deezer API Wrapper.

Implements several classes to interact with all types of Deezer objects, do some searches, and build application written in Python on top of it

Deezer Python Client

Build status Build status Test coverage percentage Maintainability black

Documentation Status PyPi Status pyversions license LoC

A friendly wrapper around the Deezer API.

Installation

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

pip install deezer-python

Basic Use

So far you can only retrieve the data for the public objects, for which no login is required. The objects are translated to python resources, which are basically python objects encapsulating the json dictionary returned by the API.

>>> client = deezer.Client()
>>> client.get_album(12).title
'Monkey Business'

Asynchronous client

You also can use an AsyncClient with tornado, which requires an optional dependency. You should install with pip install deezer-python[tornado]. Then, making requests look like:

>>> from tornado.gen import coroutine
>>> from tornado.ioloop import IOLoop
>>> from deezer.contrib.tornado import AsyncClient
>>>
>>>
>>> @coroutine
... def main():
...     client = AsyncClient()
...     album = yield client.get_album(12)
...     print(album.title)
...
>>> IOLoop.instance().run_sync(main)
Monkey Business

Authentication

Not supported by this package. There are excellent other python modules to handle that. There is the excellent Python Social Auth, which supports Deezer authentication.

Contents: