Skip to content

oschwede/deezer-python

 
 

Repository files navigation

Deezer Python Client

Build status Test coverage percentage Documentation Status PyPi Status Code Health pyversions license

A friendly wrapper around the Deezer API.

Installation

The package is published on the Python index simply run the following:

pip install deezer-python

And that's it!

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
u'Monkey Business'

You also can use AsyncClient with tornado.

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

See the whole API on the Sphinx generated documentation.

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.

Packages

No packages published

Languages

  • Python 100.0%