deezer-python 7.0.0__py3-none-any.whl → 7.1.1__py3-none-any.whl

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/__init__.py CHANGED
@@ -15,7 +15,7 @@ from deezer.resources import (
15
15
  User,
16
16
  )
17
17
 
18
- __version__ = "7.0.0"
18
+ __version__ = "7.1.1"
19
19
  __all__ = [
20
20
  "Album",
21
21
  "Artist",
deezer/client.py CHANGED
@@ -120,7 +120,7 @@ class Client(httpx.Client):
120
120
 
121
121
  if "type" in result and result["type"] in self.objects_types:
122
122
  object_class = self.objects_types[result["type"]]
123
- elif "type" in result or not resource_type and "id" in result:
123
+ elif "type" in result or (not resource_type and "id" in result):
124
124
  # in case any new types are introduced by the API
125
125
  object_class = Resource
126
126
  elif resource_type:
deezer/pagination.py CHANGED
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
- from typing import Generator, Generic, TypeVar, overload
3
+ from collections.abc import Generator
4
+ from typing import Generic, TypeVar, overload
4
5
  from urllib.parse import parse_qs, urlparse
5
6
 
6
7
  import deezer
@@ -57,7 +57,8 @@ class Artist(Resource):
57
57
 
58
58
  :returns: list of :class:`Track <deezer.Track>` instances
59
59
  """
60
- return self.get_relation("radio", **kwargs)
60
+ # radio returns tracks from different artists -> no fwd parent
61
+ return self.get_relation("radio", fwd_parent=False, **kwargs)
61
62
 
62
63
  def get_albums(self, **kwargs) -> PaginatedList[Album]:
63
64
  """
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
- from typing import TYPE_CHECKING, Iterable
3
+ from collections.abc import Iterable
4
+ from typing import TYPE_CHECKING
4
5
 
5
6
  from ..utils import gen_ids
6
7
  from .resource import Resource
@@ -61,6 +61,7 @@ class Resource:
61
61
  relation: str,
62
62
  resource_type: type[Resource] | None = None, # type: ignore[valid-type]
63
63
  params: dict | None = None,
64
+ fwd_parent: bool = True,
64
65
  ):
65
66
  """
66
67
  Generic method to load the relation from any resource.
@@ -73,7 +74,7 @@ class Resource:
73
74
  return self.client.request(
74
75
  "GET",
75
76
  f"{self.type}/{self.id}/{relation}",
76
- parent=self,
77
+ parent=self if fwd_parent else None,
77
78
  resource_type=resource_type,
78
79
  params=params,
79
80
  )
deezer/utils.py CHANGED
@@ -1,6 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
- from typing import TYPE_CHECKING, Generator, Iterable
3
+ from collections.abc import Generator, Iterable
4
+ from typing import TYPE_CHECKING
4
5
 
5
6
  if TYPE_CHECKING:
6
7
  from deezer import Resource
@@ -1,33 +1,31 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: deezer-python
3
- Version: 7.0.0
3
+ Version: 7.1.1
4
4
  Summary: A friendly wrapper library for the Deezer API
5
- Home-page: https://github.com/browniebroke/deezer-python
5
+ Author-email: Bruno Alla <alla.brunoo@gmail.com>
6
6
  License: MIT
7
- Keywords: deezer,sdk,client,requests
8
- Author: Bruno Alla
9
- Author-email: alla.brunoo@gmail.com
10
- Requires-Python: >=3.8,<4.0
7
+ Project-URL: Bug Tracker, https://github.com/browniebroke/deezer-python/issues
8
+ Project-URL: Changelog, https://deezer-python.readthedocs.io/en/latest/changelog.html
9
+ Project-URL: documentation, https://deezer-python.readthedocs.io
10
+ Project-URL: Mastodon, https://fosstodon.org/@browniebroke
11
+ Project-URL: repository, https://github.com/browniebroke/deezer-python
12
+ Project-URL: Twitter, https://twitter.com/_BrunoAlla
13
+ Keywords: client,deezer,requests,sdk
11
14
  Classifier: Development Status :: 5 - Production/Stable
12
15
  Classifier: Intended Audience :: Developers
13
- Classifier: License :: OSI Approved :: MIT License
14
16
  Classifier: Natural Language :: English
15
17
  Classifier: Operating System :: OS Independent
16
- Classifier: Programming Language :: Python :: 3
17
- Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3 :: Only
18
19
  Classifier: Programming Language :: Python :: 3.9
19
20
  Classifier: Programming Language :: Python :: 3.10
20
21
  Classifier: Programming Language :: Python :: 3.11
21
22
  Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
22
24
  Classifier: Topic :: Software Development :: Libraries
23
- Requires-Dist: httpx (>=0.23.0)
24
- Project-URL: Bug Tracker, https://github.com/browniebroke/deezer-python/issues
25
- Project-URL: Changelog, https://deezer-python.readthedocs.io/en/latest/changelog.html
26
- Project-URL: Documentation, https://deezer-python.readthedocs.io
27
- Project-URL: Mastodon, https://fosstodon.org/@browniebroke
28
- Project-URL: Repository, https://github.com/browniebroke/deezer-python
29
- Project-URL: Twitter, https://twitter.com/_BrunoAlla
25
+ Requires-Python: >=3.9
30
26
  Description-Content-Type: text/markdown
27
+ License-File: LICENSE.txt
28
+ Requires-Dist: httpx>=0.23
31
29
 
32
30
  # Deezer Python Client
33
31
 
@@ -43,8 +41,8 @@ Description-Content-Type: text/markdown
43
41
  </a>
44
42
  </p>
45
43
  <p align="center">
46
- <a href="https://python-poetry.org/">
47
- <img src="https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json" alt="Poetry">
44
+ <a href="https://github.com/astral-sh/uv">
45
+ <img src="https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json" alt="uv">
48
46
  </a>
49
47
  <a href="https://github.com/astral-sh/ruff">
50
48
  <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff">
@@ -130,6 +128,7 @@ on Read The Docs or have a play in pre-populated Jupyter notebook
130
128
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/bjacquin"><img src="https://avatars.githubusercontent.com/u/5293357?v=4?s=100" width="100px;" alt="Bertrand Jacquin"/><br /><sub><b>Bertrand Jacquin</b></sub></a><br /><a href="https://github.com/browniebroke/deezer-python/commits?author=bjacquin" title="Code">💻</a></td>
131
129
  <td align="center" valign="top" width="14.28%"><a href="https://github.com/prndrbr"><img src="https://avatars.githubusercontent.com/u/96344856?v=4?s=100" width="100px;" alt="Pierre"/><br /><sub><b>Pierre</b></sub></a><br /><a href="https://github.com/browniebroke/deezer-python/commits?author=prndrbr" title="Code">💻</a> <a href="https://github.com/browniebroke/deezer-python/commits?author=prndrbr" title="Documentation">📖</a></td>
132
130
  <td align="center" valign="top" width="14.28%"><a href="https://jonathanbangert.com"><img src="https://avatars.githubusercontent.com/u/74015378?v=4?s=100" width="100px;" alt="Jonathan"/><br /><sub><b>Jonathan</b></sub></a><br /><a href="https://github.com/browniebroke/deezer-python/commits?author=Un10ck3d" title="Code">💻</a> <a href="https://github.com/browniebroke/deezer-python/commits?author=Un10ck3d" title="Documentation">📖</a> <a href="https://github.com/browniebroke/deezer-python/commits?author=Un10ck3d" title="Tests">⚠️</a></td>
131
+ <td align="center" valign="top" width="14.28%"><a href="https://tdambrin.github.io"><img src="https://avatars.githubusercontent.com/u/61944454?v=4?s=100" width="100px;" alt="Thomas Dambrin"/><br /><sub><b>Thomas Dambrin</b></sub></a><br /><a href="https://github.com/browniebroke/deezer-python/issues?q=author%3Atdambrin" title="Bug reports">🐛</a></td>
133
132
  </tr>
134
133
  </tbody>
135
134
  </table>
@@ -141,4 +140,3 @@ on Read The Docs or have a play in pre-populated Jupyter notebook
141
140
 
142
141
  This project follows the [all-contributors](https://allcontributors.org) specification.
143
142
  Contributions of any kind are welcome!
144
-
@@ -1,24 +1,25 @@
1
- deezer/__init__.py,sha256=5Rja7dJ3fy4eDgn_SU8WvnPFj26DW8UQ7_3UUACF5fw,556
1
+ deezer/__init__.py,sha256=MKyEwdyCYptNj93V2ka9rbEPvjPuKEgPb24XeN6ullQ,556
2
2
  deezer/auth.py,sha256=mKnPDiNBJKEq7Qo0CDu2kW_agviGpTdCbj_duFpYWco,691
3
- deezer/client.py,sha256=rOQjcwvEb3tbySLWUqAhNna3zr97MBDMC5JHZm0-53c,24780
3
+ deezer/client.py,sha256=SmHZtjvd6F6okjoCF5tnkaoIDD_RzqztfbIeP6dyI3E,24782
4
4
  deezer/dates.py,sha256=raTeUAAOkajl0TTzM2cupzieTY0amzTeZCaaT3gp_iU,648
5
5
  deezer/exceptions.py,sha256=fDLZ63QllqaTwX83cJm1czwEz39ysAcKPB4ie_rAhYI,2004
6
- deezer/pagination.py,sha256=XXk8uh-9XjXDxx8Fw-cmX2zq-yGNQf9yhum2AISAVZE,4081
6
+ deezer/pagination.py,sha256=iufsEnRqjXvtwWDLMnhf_Adptw1dvb8pk3dRsjTHnu8,4108
7
+ deezer/utils.py,sha256=uXCAnEZR0ulro9lz3YHlwsMgjC1_6_twqDVzGgCuuhM,610
7
8
  deezer/resources/__init__.py,sha256=WLHWGhV5rLyzZe9IjAtVWUsLvNJDWoldgE2JIADC0L4,549
8
9
  deezer/resources/album.py,sha256=83PXZNSSkxY7qVVgyvgyHceaV4IMoQxfqcbTR5v-l38,1734
9
- deezer/resources/artist.py,sha256=A2mZDceh82cQOsMl3cczgm97UCCUHehNeoPYR8IWjds,2150
10
+ deezer/resources/artist.py,sha256=bWt4QmKK6Ywzc5JoekcSHpV7uysy_wM61bjKJMkZnBo,2239
10
11
  deezer/resources/chart.py,sha256=l4l5M7bYcW1-lFKZl874CGWi-gjOVBcskJ-zL5DMcXE,2193
11
12
  deezer/resources/editorial.py,sha256=eD2W9BctUSdUMo3VTMHEFkzGIRkvolLLz20ZD_pWclw,1373
12
13
  deezer/resources/episode.py,sha256=1dOBQeNQeKofO_HaMFCg-rKYaPxyqgIm2eMTw0RA-vk,1722
13
14
  deezer/resources/genre.py,sha256=CDWyNyFT3fXQM7jPkz3UtGr8gNtVn9430h11Jl0ZwAc,1355
14
- deezer/resources/playlist.py,sha256=9ErXYNhGGNQ3c9COfMRfEvTWJ9QlJsGjxipgKtIIq7s,3215
15
+ deezer/resources/playlist.py,sha256=lC06LGRTpJKWxsDJHnreaWFUhYuX_ssb44sAlQZYIKU,3242
15
16
  deezer/resources/podcast.py,sha256=FwfOe-m4xI1iRwauZpMjKzXKfLDryDz9Y5cVVzP8wVo,915
16
17
  deezer/resources/radio.py,sha256=moOdlSJABqCcluInvgbHSwIzSIhDvBQaVyDGdgeVr_0,805
17
- deezer/resources/resource.py,sha256=F_u1hJBqTlF_gIC00fqGfWXuDoxLgEYz5m_qeLYv_hA,5202
18
+ deezer/resources/resource.py,sha256=4ma_lH6S0ZljBQ24MNdOxotGJFL3rGThLSnea-RSweg,5259
18
19
  deezer/resources/track.py,sha256=e3DPTsYWq5yNCjMRQhGTrFQHfQUe3xn0mEVYbpL3O_0,1546
19
20
  deezer/resources/user.py,sha256=kCgMUEbKt1QJzzBEpYxPNM3IbojMlm1fYYTSgqa4Sug,6899
20
- deezer/utils.py,sha256=Z4QA5Ud5KPiGGv5buTdUidixmkEF9UhwCoYZiGXE-cE,583
21
- deezer_python-7.0.0.dist-info/LICENSE.txt,sha256=lGqKEubFaPBoiJVRoHOxg1LYlte1e5kLoq6zWUSRQzQ,1054
22
- deezer_python-7.0.0.dist-info/METADATA,sha256=qHc5BbQrj_dvLh6DqOhIIdOzI9iWP-uCSgjJ0JqdnX8,13718
23
- deezer_python-7.0.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
24
- deezer_python-7.0.0.dist-info/RECORD,,
21
+ deezer_python-7.1.1.dist-info/LICENSE.txt,sha256=lGqKEubFaPBoiJVRoHOxg1LYlte1e5kLoq6zWUSRQzQ,1054
22
+ deezer_python-7.1.1.dist-info/METADATA,sha256=2NHpdWC_LBmzb8OC6ejxxED_KI-YUHcpa02yX3TKZqQ,13988
23
+ deezer_python-7.1.1.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
24
+ deezer_python-7.1.1.dist-info/top_level.txt,sha256=yEWpBI2w2sX3SpyAi-ZGzg-lpP8apYE6uEgvnnb7S44,7
25
+ deezer_python-7.1.1.dist-info/RECORD,,
@@ -1,4 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 1.9.0
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ deezer