Skip to main content

A friendly wrapper library for the Deezer API

Project description

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'

See the whole API reference on the Sphinx generated documentation.

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.

History

0.9.0 (2019-02-10)

  • Add Client.advanced_search.

0.8.0 (2018-10-30)

  • Added index and limit to Client.search & Client.get_charts. Defaults are set to Deezer API defaults.

  • Changed tornado to be an optional requirement. If you want to use the asynchronous client, you need to install the library as follow pip install deezer-python[tornado].

  • Simplified a couple of things to rely more on six for Python compatibility.

  • Auto-format code using black.

0.7.0 (2018-10-03)

  • Breaking: the async module has been renamed asynchronous as it was breaking under Python 3.7, thanks Matheus Horstmann for the patch

  • Optimisation: the session is now stored internally by the client

0.6.1 (2017-06-19)

  • Added access token to the request kwargs. Thanks Nikolay Sheregeda for the patch.

  • Documentation update, thanks Khamaileon for the correction.

0.6.0 (2016-12-27)

  • Refactoring to use requests instead of urllib, mocking using Requests mock instead of manual patching. Use six for Python 2 and 3 compatibility.

0.5.0 (2016-12-26)

  • Python 3.6 support

  • Remove Python 3.2 classifier, support was dropped since 0.2.3

  • Updated docs and testing setup

0.4.0 (2016-12-08)

  • Add the chart resource. Thanks to Pascal.

  • Documentation updates regarding changelog and list of authors.

0.3.0 (2016-11-09)

  • Enriching the API for resources to get related resources as iterators. Thanks to Pascal.

0.2.3 (2016-11-07)

  • Drop support for Python 3.2. It should still work, but we are not testing it anymore, as this version as reached end of life.

0.2.2 (2015-09-14)

  • Python 3.5 support

  • Various doc updates

0.2.0 (2015-01-31)

  • Enriching the API for resources to get artists for a genre, top tracks of an artist, etc… Thanks to Misuzu.

0.1.0 (2014-11-22)

  • Initial release.

Credits

“deezer-python” is written and maintained by Bruno Alla.

Contributors

Other people contributed to this project:

Please add yourself here alphabetically when you submit your first pull request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deezer-python-0.9.0.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

deezer_python-0.9.0-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file deezer-python-0.9.0.tar.gz.

File metadata

  • Download URL: deezer-python-0.9.0.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.0 CPython/3.6.3

File hashes

Hashes for deezer-python-0.9.0.tar.gz
Algorithm Hash digest
SHA256 57e7c965744c251772f7938cf829186475be0a15ca5128c9086ade66d549c4c5
MD5 6b23a7ec5b82e6085fd81dbc35d2db4e
BLAKE2b-256 d99529c1951538d58178683667dc81b5ccc20a95ff6cf39e3db5291725225814

See more details on using hashes here.

File details

Details for the file deezer_python-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: deezer_python-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.0 CPython/3.6.3

File hashes

Hashes for deezer_python-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c27054e0318df9f1c96fd5bb4f428294c6fe54fada1ca809b1b307964290e5e
MD5 df6520fc73af2e4c2ba0e9926ad2b4af
BLAKE2b-256 6bc46af3a7e3ed26f81908a86a0d5497ff86a1eaa23bc37db1b222df2713804f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page