deezer-python 1.0.0__tar.gz → 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. {deezer-python-1.0.0 → Users/bruno/.virtualenvs/deezer-python/lib/python3.6/site-packages}/deezer/__init__.py +1 -1
  2. Users/bruno/.virtualenvs/deezer-python/lib/python3.6/site-packages/deezer/__pycache__/__init__.cpython-36.pyc +0 -0
  3. Users/bruno/.virtualenvs/deezer-python/lib/python3.6/site-packages/deezer/__pycache__/asynchronous.cpython-36.pyc +0 -0
  4. Users/bruno/.virtualenvs/deezer-python/lib/python3.6/site-packages/deezer/__pycache__/client.cpython-36.pyc +0 -0
  5. Users/bruno/.virtualenvs/deezer-python/lib/python3.6/site-packages/deezer/__pycache__/resources.cpython-36.pyc +0 -0
  6. Users/bruno/.virtualenvs/deezer-python/lib/python3.6/site-packages/deezer/__pycache__/utils.cpython-36.pyc +0 -0
  7. deezer-python-1.0.0/deezer/contrib/tornado.py → Users/bruno/.virtualenvs/deezer-python/lib/python3.6/site-packages/deezer/asynchronous.py +9 -10
  8. {deezer-python-1.0.0 → Users/bruno/.virtualenvs/deezer-python/lib/python3.6/site-packages}/deezer/client.py +17 -4
  9. Users/bruno/.virtualenvs/deezer-python/lib/python3.6/site-packages/deezer/utils.py +20 -0
  10. {deezer-python-1.0.0 → Users/bruno/.virtualenvs/deezer-python/lib/python3.6/site-packages/deezer_python-1.1.0-py3.6.egg-info}/PKG-INFO +16 -8
  11. {deezer-python-1.0.0/deezer_python.egg-info → Users/bruno/.virtualenvs/deezer-python/lib/python3.6/site-packages/deezer_python-1.1.0-py3.6.egg-info}/SOURCES.txt +2 -0
  12. deezer-python-1.0.0/.coveragerc +0 -17
  13. deezer-python-1.0.0/AUTHORS.rst +0 -21
  14. deezer-python-1.0.0/CONTRIBUTING.rst +0 -127
  15. deezer-python-1.0.0/HISTORY.rst +0 -100
  16. deezer-python-1.0.0/LICENSE.txt +0 -19
  17. deezer-python-1.0.0/MANIFEST.in +0 -10
  18. deezer-python-1.0.0/README.rst +0 -91
  19. deezer-python-1.0.0/deezer/contrib/__init__.py +0 -0
  20. deezer-python-1.0.0/deezer_python.egg-info/PKG-INFO +0 -241
  21. deezer-python-1.0.0/docs/Makefile +0 -177
  22. deezer-python-1.0.0/docs/make.bat +0 -242
  23. deezer-python-1.0.0/docs/source/_static/.placeholder +0 -0
  24. deezer-python-1.0.0/docs/source/api_reference/client.rst +0 -5
  25. deezer-python-1.0.0/docs/source/api_reference/contrib/tornado.rst +0 -5
  26. deezer-python-1.0.0/docs/source/api_reference/resources.rst +0 -5
  27. deezer-python-1.0.0/docs/source/api_reference/toc.rst +0 -8
  28. deezer-python-1.0.0/docs/source/authors.rst +0 -1
  29. deezer-python-1.0.0/docs/source/changelog.rst +0 -1
  30. deezer-python-1.0.0/docs/source/conf.py +0 -273
  31. deezer-python-1.0.0/docs/source/contributing.rst +0 -1
  32. deezer-python-1.0.0/docs/source/index.rst +0 -17
  33. deezer-python-1.0.0/docs/source/license.rst +0 -4
  34. deezer-python-1.0.0/requirements-test.txt +0 -8
  35. deezer-python-1.0.0/requirements.txt +0 -1
  36. deezer-python-1.0.0/setup.cfg +0 -43
  37. deezer-python-1.0.0/setup.py +0 -48
  38. {deezer-python-1.0.0 → Users/bruno/.virtualenvs/deezer-python/lib/python3.6/site-packages}/deezer/resources.py +0 -0
  39. {deezer-python-1.0.0/deezer_python.egg-info → Users/bruno/.virtualenvs/deezer-python/lib/python3.6/site-packages/deezer_python-1.1.0-py3.6.egg-info}/dependency_links.txt +0 -0
  40. {deezer-python-1.0.0/deezer_python.egg-info → Users/bruno/.virtualenvs/deezer-python/lib/python3.6/site-packages/deezer_python-1.1.0-py3.6.egg-info}/requires.txt +0 -0
  41. {deezer-python-1.0.0/deezer_python.egg-info → Users/bruno/.virtualenvs/deezer-python/lib/python3.6/site-packages/deezer_python-1.1.0-py3.6.egg-info}/top_level.txt +0 -0
@@ -9,7 +9,7 @@ from deezer.resources import Album, Resource, Artist, Playlist
9
9
  from deezer.resources import Genre, Track, User, Comment, Radio
10
10
 
11
11
 
12
- __version__ = "1.0.0"
12
+ __version__ = "1.1.0"
13
13
  __all__ = [
14
14
  "Client",
15
15
  "Resource",
@@ -5,7 +5,7 @@ Implements an async tornado client class to query the
5
5
  import json
6
6
  import logging
7
7
 
8
- from tornado.gen import Return, coroutine
8
+ from tornado.gen import coroutine, Return
9
9
  from tornado.httpclient import AsyncHTTPClient
10
10
 
11
11
  from deezer.client import Client
@@ -13,27 +13,26 @@ from deezer.client import Client
13
13
 
14
14
  class AsyncClient(Client):
15
15
  """
16
- An async client to retrieve some basic infos about Deezer resources.
16
+ An async client to retrieve some basic infos about Deezer resourses.
17
17
 
18
18
  Create a client instance with the provided options. Options should
19
19
  be passed in to the constructor as kwargs.
20
20
 
21
- >>> from deezer.contrib.tornado import AsyncClient
22
- >>> client = AsyncClient(app_id='foo', app_secret='bar')
21
+ >>> import deezer
22
+ >>> client = deezer.AsyncClient(app_id='foo', app_secret='bar')
23
23
 
24
24
  This client provides several method to retrieve the content of most
25
25
  sort of Deezer objects, based on their json structure.
26
26
  """
27
27
 
28
28
  def __init__(self, *args, **kwargs):
29
- super().__init__(*args, **kwargs)
30
- max_clients = kwargs.get("max_clients", 2)
29
+ super(AsyncClient, self).__init__(*args, **kwargs)
30
+ max_clients = kwargs.get('max_clients', 2)
31
31
  self._async_client = AsyncHTTPClient(max_clients=max_clients)
32
32
 
33
33
  @coroutine
34
- def get_object(
35
- self, object_t, object_id=None, relation=None, parent=None, **kwargs
36
- ):
34
+ def get_object(self, object_t, object_id=None, relation=None, parent=None,
35
+ **kwargs):
37
36
  """
38
37
  Actually query the Deezer API to retrieve the object
39
38
 
@@ -43,7 +42,7 @@ class AsyncClient(Client):
43
42
  url = self.object_url(object_t, object_id, relation, **kwargs)
44
43
  logging.debug(url)
45
44
  response = yield self._async_client.fetch(url)
46
- resp_str = response.body.decode("utf-8")
45
+ resp_str = response.body.decode('utf-8')
47
46
  jsn = json.loads(resp_str)
48
47
  result = self._process_json(jsn, parent)
49
48
  raise Return(result)
@@ -5,6 +5,7 @@ Implements a client class to query the
5
5
  import requests
6
6
  from urllib.parse import urlencode
7
7
 
8
+ from deezer.utils import SortedDict
8
9
  from deezer.resources import Album, Artist, Comment, Genre
9
10
  from deezer.resources import Chart, Resource
10
11
  from deezer.resources import Playlist, Radio, Track, User
@@ -48,6 +49,11 @@ class Client:
48
49
  self.use_ssl = kwargs.get("use_ssl", self.use_ssl)
49
50
  self.host = kwargs.get("host", self.host)
50
51
  self.session = requests.Session()
52
+
53
+ # Do not compress the response: to be readable in tests (cassettes)
54
+ if kwargs.get("do_not_compress_reponse"):
55
+ self.session.headers.update({"Accept-Encoding": "identity"})
56
+
51
57
  self.options = kwargs
52
58
  self._authorize_url = None
53
59
 
@@ -112,7 +118,9 @@ class Client:
112
118
  for key, value in kwargs.items():
113
119
  if not isinstance(value, str):
114
120
  kwargs[key] = str(value)
115
- result = "{}?{}".format(base_url, urlencode(kwargs))
121
+ # kwargs are sorted (for consistent tests between Python < 3.7 and >= 3.7)
122
+ sorted_kwargs = SortedDict.from_dict(kwargs)
123
+ result = "{}?{}".format(base_url, urlencode(sorted_kwargs))
116
124
  else:
117
125
  result = base_url
118
126
  return result
@@ -231,7 +239,9 @@ class Client:
231
239
 
232
240
  :returns: a list of :class:`~deezer.resources.Resource` objects.
233
241
  """
234
- return self.get_object("search", relation=relation, q=query, **kwargs)
242
+ return self.get_object(
243
+ "search", relation=relation, q=query, index=index, limit=limit, **kwargs
244
+ )
235
245
 
236
246
  def advanced_search(self, terms, relation=None, index=0, limit=25, **kwargs):
237
247
  """
@@ -247,5 +257,8 @@ class Client:
247
257
  ... relation="track")
248
258
  """
249
259
  assert isinstance(terms, dict), "terms must be a dict"
250
- query = " ".join(['{}:"{}"'.format(k, v) for (k, v) in terms.items()])
251
- return self.get_object("search", relation=relation, q=query, **kwargs)
260
+ # terms are sorted (for consistent tests between Python < 3.7 and >= 3.7)
261
+ query = " ".join(sorted(['{}:"{}"'.format(k, v) for (k, v) in terms.items()]))
262
+ return self.get_object(
263
+ "search", relation=relation, q=query, index=index, limit=limit, **kwargs
264
+ )
@@ -0,0 +1,20 @@
1
+ """Utils."""
2
+
3
+ from collections import OrderedDict
4
+
5
+
6
+ class SortedDict(OrderedDict):
7
+ """Sorted ``dict``.
8
+
9
+ This class is present to order query string and keep the request call always the
10
+ same way. This is necessary to have reproductible tests with ``vcr.py``.
11
+
12
+ ``dict`` ordering is deterministic before 3.6 and is not guaranteed in Python < 3.7
13
+ """
14
+
15
+ @classmethod
16
+ def from_dict(cls, dct):
17
+ odict = cls()
18
+ for key in sorted(dct.keys()):
19
+ odict[key] = dct[key]
20
+ return odict
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: deezer-python
3
- Version: 1.0.0
3
+ Version: 1.1.0
4
4
  Summary: A friendly wrapper library for the Deezer API
5
5
  Home-page: https://github.com/browniebroke/deezer-python
6
6
  Author: Bruno Alla
7
7
  Author-email: alla.brunoo@gmail.com
8
8
  License: MIT
9
- Download-URL: https://github.com/browniebroke/deezer-python/tarball/1.0.0
9
+ Download-URL: https://github.com/browniebroke/deezer-python/tarball/1.1.0
10
10
  Description: Deezer Python Client
11
11
  ====================
12
12
 
@@ -38,7 +38,7 @@ Description: Deezer Python Client
38
38
  >>> client.get_album(12).title
39
39
  'Monkey Business'
40
40
 
41
- See the whole API reference on the `Sphinx`_ generated `documentation`_.
41
+ The detailed `API reference`_ is available in the `documentation`_ on the RTD.
42
42
 
43
43
  Asynchronous client
44
44
  ```````````````````
@@ -95,7 +95,7 @@ Description: Deezer Python Client
95
95
  .. |pyversions| image:: https://img.shields.io/pypi/pyversions/deezer-python.svg?style=flat-square
96
96
  .. |license| image:: https://img.shields.io/pypi/l/deezer-python.svg?style=flat-square
97
97
  .. _Deezer API: http://developers.deezer.com/api
98
- .. _Sphinx: http://sphinx-doc.org/
98
+ .. _API reference: https://deezer-python.readthedocs.io/api_reference/toc.html
99
99
  .. _documentation: http://deezer-python.readthedocs.io/
100
100
  .. _Python Social Auth: https://github.com/python-social-auth
101
101
 
@@ -105,7 +105,14 @@ Description: Deezer Python Client
105
105
  History
106
106
  =======
107
107
 
108
- 1.0.0 (unreleased)
108
+ 1.1.0 (2019-05-25)
109
+ ------------------
110
+
111
+ - Tests with ``vcr.py`` instead of ``requests_mock``.
112
+ - Support for Python 3.7 & 3.8 is finally official.
113
+ - Breaking: drop support for Python 3.4.
114
+
115
+ 1.0.0 (2019-02-11)
109
116
  ------------------
110
117
 
111
118
  - Breaking: drop support for Python 2.
@@ -225,17 +232,18 @@ Description: Deezer Python Client
225
232
  Please add yourself here alphabetically when you submit your first pull request.
226
233
 
227
234
  Platform: UNKNOWN
228
- Classifier: Development Status :: 4 - Beta
235
+ Classifier: Development Status :: 5 - Production/Stable
229
236
  Classifier: Intended Audience :: Developers
230
237
  Classifier: Natural Language :: English
231
238
  Classifier: License :: OSI Approved :: MIT License
232
239
  Classifier: Operating System :: OS Independent
233
240
  Classifier: Programming Language :: Python
234
241
  Classifier: Programming Language :: Python :: 3
235
- Classifier: Programming Language :: Python :: 3.4
236
242
  Classifier: Programming Language :: Python :: 3.5
237
243
  Classifier: Programming Language :: Python :: 3.6
244
+ Classifier: Programming Language :: Python :: 3.7
245
+ Classifier: Programming Language :: Python :: 3.8
238
246
  Classifier: Programming Language :: Python :: 3 :: Only
239
247
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
240
- Requires-Python: >=3.4
248
+ Requires-Python: >=3.5
241
249
  Provides-Extra: tornado
@@ -12,6 +12,7 @@ setup.py
12
12
  deezer/__init__.py
13
13
  deezer/client.py
14
14
  deezer/resources.py
15
+ deezer/utils.py
15
16
  deezer/contrib/__init__.py
16
17
  deezer/contrib/tornado.py
17
18
  deezer_python.egg-info/PKG-INFO
@@ -31,4 +32,5 @@ docs/source/_static/.placeholder
31
32
  docs/source/api_reference/client.rst
32
33
  docs/source/api_reference/resources.rst
33
34
  docs/source/api_reference/toc.rst
35
+ docs/source/api_reference/utils.rst
34
36
  docs/source/api_reference/contrib/tornado.rst
@@ -1,17 +0,0 @@
1
- # Test coverage configuration.
2
- # Usage:
3
- # pip install coverage
4
- # coverage erase # clears previous data if any
5
- # coverage run -m unittest discover
6
- # coverage report # prints to stdout
7
- # coverage html # creates ./htmlcov/*.html including annotated source
8
- [run]
9
- branch = true
10
- source = deezer
11
- omit =
12
- ENV/*
13
- deezer/tests/*
14
-
15
- [report]
16
- # Ignore missing source files, i.e. fake template-generated "files"
17
- ignore_errors = true
@@ -1,21 +0,0 @@
1
- Credits
2
- =======
3
-
4
- “deezer-python” is written and maintained by Bruno Alla.
5
-
6
-
7
- Contributors
8
- ------------
9
-
10
- Other people contributed to this project:
11
-
12
- - `Hugo van Kemenade <https://github.com/hugovk>`_
13
- - `Jonathan Virga <https://github.com/jnth>`_
14
- - `khamaileon <https://github.com/khamaileon>`_
15
- - `Kieran Wynne <https://github.com/k33k00>`_
16
- - `Matheus Horstmann <https://github.com/horstmannmat>`_
17
- - `Misuzu <https://github.com/misuzu>`_
18
- - `Nikolay Sheregeda <https://github.com/sheregeda>`_
19
- - `Pascal <https://github.com/pfouque>`_
20
-
21
- Please add yourself here alphabetically when you submit your first pull request.
@@ -1,127 +0,0 @@
1
- ============
2
- Contributing
3
- ============
4
-
5
- Contributions are welcome, and they are greatly appreciated! Every
6
- little bit helps, and credit will always be given.
7
-
8
- You can contribute in many ways:
9
-
10
- Types of Contributions
11
- ----------------------
12
-
13
- Report Bugs
14
- ~~~~~~~~~~~
15
-
16
- Report bugs on the `issues page`_. If you are reporting a bug, please include:
17
-
18
- * Any details about your local setup that might be helpful in troubleshooting.
19
- * Detailed steps to reproduce the bug.
20
-
21
- Fix Bugs
22
- ~~~~~~~~
23
-
24
- Look through the GitHub issues for bugs. Anything tagged with "bug"
25
- is open to whoever wants to implement it.
26
-
27
- Implement Features
28
- ~~~~~~~~~~~~~~~~~~
29
-
30
- Look through the GitHub issues for features. Anything tagged with "feature"
31
- is open to whoever wants to implement it.
32
-
33
- Write Documentation
34
- ~~~~~~~~~~~~~~~~~~~
35
-
36
- This module could always use more documentation, whether as part of the
37
- official docs, in docstrings, or other.
38
-
39
- Submit Feedback
40
- ~~~~~~~~~~~~~~~
41
-
42
- The best way to send feedback is to file an ticket on the `issues page`_. If you
43
- are proposing a feature:
44
-
45
- * Explain how it would work.
46
- * Keep the scope as narrow as possible, to make it easier to implement.
47
- * Remember that this is a volunteer-driven project, and that contributions
48
- are welcome 🙂
49
-
50
- Get Started!
51
- ------------
52
-
53
- Ready to contribute? Here's how to set up ``deezer-python`` for local development.
54
-
55
- 1. Fork the repo on GitHub.
56
- 2. Clone your fork locally::
57
-
58
- $ git clone git@github.com:your_name_here/deezer-python.git
59
-
60
- 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper
61
- installed, this is how you set up your fork for local development::
62
-
63
- $ mkvirtualenv deezer-python
64
- $ cd deezer-python/
65
-
66
- 4. Create a branch for local development::
67
-
68
- $ git checkout -b name-of-your-bugfix-or-feature
69
-
70
- Now you can make your changes locally.
71
-
72
- 5. When you're done making changes, check that your changes pass our
73
- tests and that the doc builds. The easiest way to do that is by running
74
- `tox`_ environments::
75
-
76
- $ tox -e lint,docs,py36
77
-
78
- It will run our linters (`flake8`_ and `black`_), build the docs and run the tests
79
-
80
- 6. Commit your changes, quoting GitHub issue in the commit message, if applicable,
81
- and push your branch to GitHub::
82
-
83
- $ git add .
84
- $ git commit -m "Fix #XX - My awesome fix"
85
- $ git push origin name-of-your-bugfix-or-feature
86
-
87
- 7. Submit a pull request on GitHub.
88
-
89
- Pull Request Guidelines
90
- -----------------------
91
-
92
- Feel free to open the pull request as soon as possible, but please be explicit
93
- if it's still a work in progress. To be mergeable, pull requests should follow the
94
- following guidelines:
95
-
96
- 1. It should include tests for feature or bug fixes.
97
- 2. If it adds functionality, the docs should be updated.
98
- 3. It should work for Python 3.4, 3.5, 3.6 and for PyPy3.
99
- Check `Travis`_ as well as `AppVeyor`_ and make sure that the tests
100
- pass for all supported Python versions.
101
- 4. If your change is worthwhile a mention in the changelog, update the
102
- Unreleased section of ``HISTORY.rst``.
103
- 5. If this is your first contribution, don't forget to leave your name in
104
- the ``AUTHORS.rst`` file.
105
-
106
- Create a New Release
107
- --------------------
108
-
109
- This project is configured to use `bumpversion`_, only prerequisite
110
- is to have it installed. When the tests have passed and you're happy with the code base,
111
- you can bump the version everywhere needed, commit and create a git tag by running::
112
-
113
- $ bumpversion [major|minor|patch]
114
-
115
- Then, do a git push, without forgetting about git tags::
116
-
117
- $ git push --tags
118
-
119
- `Travis`_ will take care of creating the release, and upload it to PyPI.
120
-
121
- .. _issues page: https://github.com/browniebroke/deezer-python/issues
122
- .. _Travis: https://travis-ci.org/browniebroke/deezer-python/pull_requests
123
- .. _AppVeyor: https://ci.appveyor.com/project/browniebroke/deezer-python
124
- .. _tox: http://tox.readthedocs.io/en/stable/index.html
125
- .. _flake8: http://flake8.pycqa.org/en/latest/
126
- .. _black: https://github.com/ambv/black
127
- .. _bumpversion: https://github.com/peritus/bumpversion
@@ -1,100 +0,0 @@
1
- .. :changelog:
2
-
3
- History
4
- =======
5
-
6
- 1.0.0 (unreleased)
7
- ------------------
8
-
9
- - Breaking: drop support for Python 2.
10
-
11
- 0.9.0 (2019-02-10)
12
- ------------------
13
-
14
- - Add ``Client.advanced_search``.
15
-
16
- 0.8.0 (2018-10-30)
17
- ------------------
18
-
19
- - Added ``index`` and ``limit`` to ``Client.search`` & ``Client.get_charts``.
20
- Defaults are set to Deezer API defaults.
21
- - Changed tornado to be an optional requirement. If you want to use the
22
- asynchronous client, you need to install the library as follow
23
- ``pip install deezer-python[tornado]``.
24
- - Simplified a couple of things to rely more on `six`_ for Python compatibility.
25
- - Auto-format code using `black`_.
26
-
27
- .. _black: https://github.com/ambv/black
28
-
29
- 0.7.0 (2018-10-03)
30
- ------------------
31
-
32
- - Breaking: the ``async`` module has been renamed ``asynchronous`` as it was
33
- breaking under Python 3.7, thanks `Matheus Horstmann`_ for the patch
34
- - Optimisation: the session is now stored internally by the client
35
-
36
- 0.6.1 (2017-06-19)
37
- ------------------
38
-
39
- - Added access token to the request kwargs. Thanks `Nikolay Sheregeda`_ for
40
- the patch.
41
- - Documentation update, thanks `Khamaileon`_ for the correction.
42
-
43
- 0.6.0 (2016-12-27)
44
- ------------------
45
-
46
- - Refactoring to use `requests`_ instead of urllib, mocking using
47
- Requests mock instead of manual patching. Use `six`_ for Python
48
- 2 and 3 compatibility.
49
-
50
- .. _requests: http://docs.python-requests.org/
51
- .. _six: https://pythonhosted.org/six/
52
-
53
- 0.5.0 (2016-12-26)
54
- ------------------
55
-
56
- - Python 3.6 support
57
- - Remove Python 3.2 classifier, support was dropped since 0.2.3
58
- - Updated docs and testing setup
59
-
60
- 0.4.0 (2016-12-08)
61
- ------------------
62
-
63
- - Add the `chart`_ resource. Thanks to `Pascal`_.
64
- - Documentation updates regarding changelog and list of authors.
65
-
66
- 0.3.0 (2016-11-09)
67
- ------------------
68
-
69
- - Enriching the API for resources to get related resources as iterators.
70
- Thanks to `Pascal`_.
71
-
72
- 0.2.3 (2016-11-07)
73
- ------------------
74
-
75
- - Drop support for Python 3.2. It should still work, but we are not testing
76
- it anymore, as this version as reached end of life.
77
-
78
- 0.2.2 (2015-09-14)
79
- ------------------
80
-
81
- - Python 3.5 support
82
- - Various doc updates
83
-
84
- 0.2.0 (2015-01-31)
85
- ------------------
86
-
87
- - Enriching the API for resources to get artists for a genre,
88
- top tracks of an artist, etc... Thanks to `Misuzu`_.
89
-
90
- 0.1.0 (2014-11-22)
91
- ------------------
92
-
93
- - Initial release.
94
-
95
- .. _Misuzu: https://github.com/misuzu
96
- .. _Pascal: https://github.com/pfouque
97
- .. _chart: https://developers.deezer.com/api/chart
98
- .. _Khamaileon: https://github.com/khamaileon
99
- .. _Nikolay Sheregeda: https://github.com/sheregeda
100
- .. _Matheus Horstmann: https://github.com/horstmannmat
@@ -1,19 +0,0 @@
1
- Copyright (c) 2014 Bruno Alla
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining a copy
4
- of this software and associated documentation files (the "Software"), to deal
5
- in the Software without restriction, including without limitation the rights
6
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- copies of the Software, and to permit persons to whom the Software is
8
- furnished to do so, subject to the following conditions:
9
-
10
- The above copyright notice and this permission notice shall be included in
11
- all copies or substantial portions of the Software.
12
-
13
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- THE SOFTWARE.
@@ -1,10 +0,0 @@
1
- recursive-include deezer *.py
2
- include *.txt
3
- include *.rst
4
- include .coveragerc
5
- recursive-include deezer *.json
6
- recursive-include docs *.bat
7
- recursive-include docs *.placeholder
8
- recursive-include docs *.py
9
- recursive-include docs *.rst
10
- recursive-include docs Makefile
@@ -1,91 +0,0 @@
1
- Deezer Python Client
2
- ====================
3
-
4
- |build| |win_build| |coverage| |codeclimate| |black|
5
-
6
- |docs| |pypi| |pyversions| |license| |loc|
7
-
8
- A friendly wrapper around the `Deezer API`_.
9
-
10
- Installation
11
- ------------
12
-
13
- The package is published on `PyPI <https://pypi.org/project/deezer-python/>`_ and can be installed by running:
14
-
15
- ::
16
-
17
- pip install deezer-python
18
-
19
- Basic Use
20
- ---------
21
-
22
- So far you can only retrieve the data for the public objects, for which no login is required.
23
- The objects are translated to python resources, which are basically python objects encapsulating
24
- the json dictionary returned by the API.
25
-
26
- .. code-block:: python
27
-
28
- >>> client = deezer.Client()
29
- >>> client.get_album(12).title
30
- 'Monkey Business'
31
-
32
- See the whole API reference on the `Sphinx`_ generated `documentation`_.
33
-
34
- Asynchronous client
35
- ```````````````````
36
-
37
- You also can use an ``AsyncClient`` with tornado, which requires an optional dependency. You should
38
- install with ``pip install deezer-python[tornado]``. Then, making requests look like:
39
-
40
- .. code-block:: python
41
-
42
- >>> from tornado.gen import coroutine
43
- >>> from tornado.ioloop import IOLoop
44
- >>> from deezer.contrib.tornado import AsyncClient
45
- >>>
46
- >>>
47
- >>> @coroutine
48
- ... def main():
49
- ... client = AsyncClient()
50
- ... album = yield client.get_album(12)
51
- ... print(album.title)
52
- ...
53
- >>> IOLoop.instance().run_sync(main)
54
- Monkey Business
55
-
56
- Authentication
57
- --------------
58
-
59
- Not supported by this package. There are excellent other python modules to
60
- handle that. There is the excellent `Python Social Auth`_, which supports
61
- Deezer authentication.
62
-
63
- .. |build| image:: https://img.shields.io/travis/browniebroke/deezer-python.svg?style=flat-square&logo=travis
64
- :target: https://travis-ci.org/browniebroke/deezer-python
65
- :alt: Build status
66
- .. |win_build| image:: https://img.shields.io/appveyor/ci/browniebroke/deezer-python.svg?logo=appveyor&style=flat-square
67
- :target: https://ci.appveyor.com/project/browniebroke/deezer-python
68
- :alt: Build status
69
- .. |codeclimate| image:: https://api.codeclimate.com/v1/badges/bfbf562a06742972c694/maintainability
70
- :target: https://codeclimate.com/github/browniebroke/deezer-python/maintainability
71
- :alt: Maintainability
72
- .. |coverage| image:: https://img.shields.io/codecov/c/github/browniebroke/deezer-python.svg?logo=codecov&style=flat-square
73
- :target: https://codecov.io/gh/browniebroke/deezer-python
74
- :alt: Test coverage percentage
75
- .. |black| image:: https://img.shields.io/badge/code%20style-black-000000.svg
76
- :target: https://github.com/ambv/black
77
- .. |docs| image:: https://img.shields.io/readthedocs/deezer-python.svg?logo=read-the-docs&style=flat-square
78
- :target: https://deezer-python.readthedocs.io
79
- :alt: Documentation Status
80
- .. |pypi| image:: https://img.shields.io/pypi/v/deezer-python.svg?logo=python&logoColor=fff&style=flat-square
81
- :target: https://pypi.org/project/deezer-python/
82
- :alt: PyPi Status
83
- .. |loc| image:: https://tokei.rs/b1/github/browniebroke/deezer-python/
84
- :target: https://github.com/browniebroke/deezer-python
85
- :alt: LoC
86
- .. |pyversions| image:: https://img.shields.io/pypi/pyversions/deezer-python.svg?style=flat-square
87
- .. |license| image:: https://img.shields.io/pypi/l/deezer-python.svg?style=flat-square
88
- .. _Deezer API: http://developers.deezer.com/api
89
- .. _Sphinx: http://sphinx-doc.org/
90
- .. _documentation: http://deezer-python.readthedocs.io/
91
- .. _Python Social Auth: https://github.com/python-social-auth
File without changes