deezer-python 6.1.1__tar.gz → 6.2.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.
- {deezer_python-6.1.1 → deezer_python-6.2.0}/PKG-INFO +2 -2
- {deezer_python-6.1.1 → deezer_python-6.2.0}/README.md +1 -1
- {deezer_python-6.1.1 → deezer_python-6.2.0}/pyproject.toml +23 -12
- {deezer_python-6.1.1 → deezer_python-6.2.0}/src/deezer/__init__.py +1 -1
- {deezer_python-6.1.1 → deezer_python-6.2.0}/src/deezer/client.py +36 -7
- {deezer_python-6.1.1 → deezer_python-6.2.0}/src/deezer/pagination.py +2 -4
- {deezer_python-6.1.1 → deezer_python-6.2.0}/LICENSE.txt +0 -0
- {deezer_python-6.1.1 → deezer_python-6.2.0}/src/deezer/dates.py +0 -0
- {deezer_python-6.1.1 → deezer_python-6.2.0}/src/deezer/exceptions.py +0 -0
- {deezer_python-6.1.1 → deezer_python-6.2.0}/src/deezer/resources/__init__.py +0 -0
- {deezer_python-6.1.1 → deezer_python-6.2.0}/src/deezer/resources/album.py +0 -0
- {deezer_python-6.1.1 → deezer_python-6.2.0}/src/deezer/resources/artist.py +0 -0
- {deezer_python-6.1.1 → deezer_python-6.2.0}/src/deezer/resources/chart.py +0 -0
- {deezer_python-6.1.1 → deezer_python-6.2.0}/src/deezer/resources/editorial.py +0 -0
- {deezer_python-6.1.1 → deezer_python-6.2.0}/src/deezer/resources/episode.py +0 -0
- {deezer_python-6.1.1 → deezer_python-6.2.0}/src/deezer/resources/genre.py +0 -0
- {deezer_python-6.1.1 → deezer_python-6.2.0}/src/deezer/resources/playlist.py +0 -0
- {deezer_python-6.1.1 → deezer_python-6.2.0}/src/deezer/resources/podcast.py +0 -0
- {deezer_python-6.1.1 → deezer_python-6.2.0}/src/deezer/resources/radio.py +0 -0
- {deezer_python-6.1.1 → deezer_python-6.2.0}/src/deezer/resources/resource.py +0 -0
- {deezer_python-6.1.1 → deezer_python-6.2.0}/src/deezer/resources/track.py +0 -0
- {deezer_python-6.1.1 → deezer_python-6.2.0}/src/deezer/resources/user.py +0 -0
- {deezer_python-6.1.1 → deezer_python-6.2.0}/src/deezer/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: deezer-python
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.2.0
|
|
4
4
|
Summary: A friendly wrapper library for the Deezer API
|
|
5
5
|
Home-page: https://github.com/browniebroke/deezer-python
|
|
6
6
|
License: MIT
|
|
@@ -89,7 +89,7 @@ The package is published on
|
|
|
89
89
|
Easily query the Deezer API from you Python code. The data returned by the Deezer
|
|
90
90
|
API is mapped to python resources:
|
|
91
91
|
|
|
92
|
-
```
|
|
92
|
+
```pycon
|
|
93
93
|
>>> client = deezer.Client()
|
|
94
94
|
>>> client.get_album(680407).title
|
|
95
95
|
'Monkey Business'
|
|
@@ -58,7 +58,7 @@ The package is published on
|
|
|
58
58
|
Easily query the Deezer API from you Python code. The data returned by the Deezer
|
|
59
59
|
API is mapped to python resources:
|
|
60
60
|
|
|
61
|
-
```
|
|
61
|
+
```pycon
|
|
62
62
|
>>> client = deezer.Client()
|
|
63
63
|
>>> client.get_album(680407).title
|
|
64
64
|
'Monkey Business'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "deezer-python"
|
|
3
|
-
version = "6.
|
|
3
|
+
version = "6.2.0"
|
|
4
4
|
description = "A friendly wrapper library for the Deezer API"
|
|
5
5
|
authors = ["Bruno Alla <alla.brunoo@gmail.com>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -34,19 +34,19 @@ requests = ">=2.18"
|
|
|
34
34
|
optional = true
|
|
35
35
|
|
|
36
36
|
[tool.poetry.group.docs.dependencies]
|
|
37
|
-
myst-parser = ">=0.16"
|
|
38
|
-
sphinx = ">=4.0"
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
myst-parser = { version = ">=0.16", python = ">=3.11" }
|
|
38
|
+
sphinx = { version = ">=4.0", python = ">=3.11" }
|
|
39
|
+
furo = { version = ">=2023.5.20", python = ">=3.11" }
|
|
40
|
+
sphinx-autobuild = { version = ">=2024.0.0", python = ">=3.11" }
|
|
41
41
|
|
|
42
42
|
[tool.poetry.group.dev.dependencies]
|
|
43
43
|
coverage = "^7.0"
|
|
44
|
-
environs = "^
|
|
45
|
-
pytest = "^
|
|
46
|
-
pytest-cov = "^
|
|
44
|
+
environs = "^11.0.0"
|
|
45
|
+
pytest = "^8.0.0"
|
|
46
|
+
pytest-cov = "^5.0.0"
|
|
47
47
|
pytest-mock = "^3.6"
|
|
48
48
|
pytest-vcr = "^1.0"
|
|
49
|
-
vcrpy = "^
|
|
49
|
+
vcrpy = "^6.0.0"
|
|
50
50
|
deezer-oauth-cli = "^1.0.0"
|
|
51
51
|
|
|
52
52
|
[tool.semantic_release]
|
|
@@ -54,7 +54,6 @@ version_toml = ["pyproject.toml:tool.poetry.version"]
|
|
|
54
54
|
version_variables = [
|
|
55
55
|
"src/deezer/__init__.py:__version__",
|
|
56
56
|
]
|
|
57
|
-
branch = "main"
|
|
58
57
|
build_command = "pip install poetry && poetry build"
|
|
59
58
|
|
|
60
59
|
[tool.semantic_release.changelog]
|
|
@@ -66,6 +65,16 @@ exclude_commit_patterns = [
|
|
|
66
65
|
[tool.semantic_release.changelog.environment]
|
|
67
66
|
keep_trailing_newline = true
|
|
68
67
|
|
|
68
|
+
[tool.semantic_release.branches.main]
|
|
69
|
+
match = "main"
|
|
70
|
+
|
|
71
|
+
[tool.semantic_release.branches.stable]
|
|
72
|
+
match = "(?!stable/*$)"
|
|
73
|
+
|
|
74
|
+
[tool.semantic_release.branches.noop]
|
|
75
|
+
match = "(?!main$)"
|
|
76
|
+
prerelease = true
|
|
77
|
+
|
|
69
78
|
[tool.pytest.ini_options]
|
|
70
79
|
addopts = "-v -Wdefault --cov=deezer"
|
|
71
80
|
pythonpath = ["src"]
|
|
@@ -86,6 +95,8 @@ exclude_lines = [
|
|
|
86
95
|
[tool.ruff]
|
|
87
96
|
target-version = "py38"
|
|
88
97
|
line-length = 120
|
|
98
|
+
|
|
99
|
+
[tool.ruff.lint]
|
|
89
100
|
ignore = [
|
|
90
101
|
"D203", # 1 blank line required before class docstring
|
|
91
102
|
"D212", # Multi-line docstring summary should start at the first line
|
|
@@ -107,7 +118,7 @@ select = [
|
|
|
107
118
|
"RUF", # ruff specific
|
|
108
119
|
]
|
|
109
120
|
|
|
110
|
-
[tool.ruff.per-file-ignores]
|
|
121
|
+
[tool.ruff.lint.per-file-ignores]
|
|
111
122
|
"tests/**/*" = [
|
|
112
123
|
"D100",
|
|
113
124
|
"D101",
|
|
@@ -120,7 +131,7 @@ select = [
|
|
|
120
131
|
"conftest.py" = ["D100"]
|
|
121
132
|
"docs/conf.py" = ["D100"]
|
|
122
133
|
|
|
123
|
-
[tool.ruff.isort]
|
|
134
|
+
[tool.ruff.lint.isort]
|
|
124
135
|
known-first-party = ["deezer"]
|
|
125
136
|
|
|
126
137
|
[tool.mypy]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import warnings
|
|
3
4
|
from typing import Any, ClassVar
|
|
4
5
|
|
|
5
6
|
import requests
|
|
@@ -25,6 +26,8 @@ from deezer.resources import (
|
|
|
25
26
|
User,
|
|
26
27
|
)
|
|
27
28
|
|
|
29
|
+
_UNSET = object()
|
|
30
|
+
|
|
28
31
|
|
|
29
32
|
class Client:
|
|
30
33
|
"""
|
|
@@ -34,7 +37,7 @@ class Client:
|
|
|
34
37
|
be passed in to the constructor as kwargs.
|
|
35
38
|
|
|
36
39
|
>>> import deezer
|
|
37
|
-
>>> client = deezer.Client(
|
|
40
|
+
>>> client = deezer.Client()
|
|
38
41
|
|
|
39
42
|
This client provides several methods to retrieve the content most
|
|
40
43
|
kinds of Deezer objects, based on their json structure.
|
|
@@ -45,10 +48,17 @@ class Client:
|
|
|
45
48
|
>>> import deezer
|
|
46
49
|
>>> client = deezer.Client(headers={'Accept-Language': 'fr'})
|
|
47
50
|
|
|
48
|
-
:param app_id: application ID.
|
|
49
|
-
:param app_secret: application secret.
|
|
50
51
|
:param access_token: user access token.
|
|
51
52
|
:param headers: a dictionary of headers to be used.
|
|
53
|
+
|
|
54
|
+
.. deprecated:: 6.2.0
|
|
55
|
+
|
|
56
|
+
The following parameters will be removed in the next major version:
|
|
57
|
+
|
|
58
|
+
* **app_id**
|
|
59
|
+
* **app_secret**
|
|
60
|
+
|
|
61
|
+
They were never actively used by the package.
|
|
52
62
|
"""
|
|
53
63
|
|
|
54
64
|
objects_types: ClassVar[dict[str, type[Resource] | None]] = {
|
|
@@ -69,10 +79,29 @@ class Client:
|
|
|
69
79
|
base_url = "https://api.deezer.com"
|
|
70
80
|
|
|
71
81
|
def __init__(
|
|
72
|
-
self,
|
|
82
|
+
self,
|
|
83
|
+
app_id=_UNSET,
|
|
84
|
+
app_secret=_UNSET,
|
|
85
|
+
access_token=None,
|
|
86
|
+
headers=None,
|
|
87
|
+
**kwargs,
|
|
73
88
|
):
|
|
74
|
-
|
|
75
|
-
|
|
89
|
+
if app_id is not _UNSET:
|
|
90
|
+
warnings.warn(
|
|
91
|
+
"The 'app_id' parameter is not actually used and is deprecated. "
|
|
92
|
+
"It will be removed in the next major release.",
|
|
93
|
+
DeprecationWarning,
|
|
94
|
+
stacklevel=2,
|
|
95
|
+
)
|
|
96
|
+
self.app_id = app_id
|
|
97
|
+
if app_secret is not _UNSET:
|
|
98
|
+
warnings.warn(
|
|
99
|
+
"The 'app_secret' parameter is not actually used and is deprecated. "
|
|
100
|
+
"It will be removed in the next major release.",
|
|
101
|
+
DeprecationWarning,
|
|
102
|
+
stacklevel=2,
|
|
103
|
+
)
|
|
104
|
+
self.app_secret = app_secret
|
|
76
105
|
self.access_token = access_token
|
|
77
106
|
self.session = requests.Session()
|
|
78
107
|
|
|
@@ -166,7 +195,7 @@ class Client:
|
|
|
166
195
|
json_data = response.json()
|
|
167
196
|
if not isinstance(json_data, dict):
|
|
168
197
|
return json_data
|
|
169
|
-
if
|
|
198
|
+
if json_data.get("error"):
|
|
170
199
|
raise DeezerErrorResponse(json_data)
|
|
171
200
|
return self._process_json(
|
|
172
201
|
json_data,
|
|
@@ -41,12 +41,10 @@ class PaginatedList(Generic[ResourceType]):
|
|
|
41
41
|
return f"<{self.__class__.__name__} {data!r}>"
|
|
42
42
|
|
|
43
43
|
@overload
|
|
44
|
-
def __getitem__(self, index: int) -> ResourceType:
|
|
45
|
-
...
|
|
44
|
+
def __getitem__(self, index: int) -> ResourceType: ...
|
|
46
45
|
|
|
47
46
|
@overload
|
|
48
|
-
def __getitem__(self, index: slice) -> list[ResourceType]:
|
|
49
|
-
...
|
|
47
|
+
def __getitem__(self, index: slice) -> list[ResourceType]: ...
|
|
50
48
|
|
|
51
49
|
def __getitem__(
|
|
52
50
|
self,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|