yutipy 1.5.1__py3-none-any.whl → 1.5.2__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.

Potentially problematic release.


This version of yutipy might be problematic. Click here for more details.

yutipy/__init__.py CHANGED
@@ -3,6 +3,7 @@ from .itunes import Itunes
3
3
  from .kkbox import KKBox
4
4
  from .musicyt import MusicYT
5
5
  from .spotify import Spotify
6
+ from .utils import disable_logging, enable_logging
6
7
  from .yutipy_music import YutipyMusic
7
8
 
8
9
  __all__ = [
@@ -12,4 +13,6 @@ __all__ = [
12
13
  "MusicYT",
13
14
  "Spotify",
14
15
  "YutipyMusic",
16
+ "enable_logging",
17
+ "disable_logging",
15
18
  ]
yutipy/spotify.py CHANGED
@@ -33,7 +33,7 @@ SPOTIFY_CLIENT_SECRET = os.getenv("SPOTIFY_CLIENT_SECRET")
33
33
 
34
34
  class Spotify:
35
35
  """
36
- A class to interact with the Spotify API.
36
+ A class to interact with the Spotify API. It uses "Client Credentials" grant type (or flow).
37
37
 
38
38
  This class reads the ``SPOTIFY_CLIENT_ID`` and ``SPOTIFY_CLIENT_SECRET`` from environment variables or the ``.env`` file by default.
39
39
  Alternatively, you can manually provide these values when creating an object.
@@ -45,14 +45,14 @@ class Spotify:
45
45
  client_secret: str = SPOTIFY_CLIENT_SECRET,
46
46
  ) -> None:
47
47
  """
48
- Initializes the Spotify class and sets up the session.
48
+ Initializes the Spotify class (using Client Credentials grant type/flow) and sets up the session.
49
49
 
50
50
  Parameters
51
51
  ----------
52
52
  client_id : str, optional
53
- The Client ID for the Spotify API. Defaults to ``SPOTIFY_CLIENT_ID`` from .env file.
53
+ The Client ID for the Spotify API. Defaults to ``SPOTIFY_CLIENT_ID`` from environment variable or the ``.env`` file.
54
54
  client_secret : str, optional
55
- The Client secret for the Spotify API. Defaults to ``SPOTIFY_CLIENT_SECRET`` from .env file.
55
+ The Client secret for the Spotify API. Defaults to ``SPOTIFY_CLIENT_SECRET`` from environment variable or the ``.env`` file.
56
56
  """
57
57
  if not client_id or not client_secret:
58
58
  raise SpotifyException(
yutipy/utils/__init__.py CHANGED
@@ -1,13 +1,16 @@
1
1
  from .helpers import (
2
- guess_album_type,
3
2
  are_strings_similar,
3
+ guess_album_type,
4
4
  is_valid_string,
5
5
  separate_artists,
6
6
  )
7
+ from .logger import disable_logging, enable_logging
7
8
 
8
9
  __all__ = [
9
10
  "guess_album_type",
10
11
  "are_strings_similar",
11
12
  "is_valid_string",
12
13
  "separate_artists",
14
+ "enable_logging",
15
+ "disable_logging"
13
16
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: yutipy
3
- Version: 1.5.1
3
+ Version: 1.5.2
4
4
  Summary: A simple package for retrieving music information from various music platforms APIs.
5
5
  Author: Cheap Nightbot
6
6
  Author-email: Cheap Nightbot <hi@cheapnightbot.slmail.me>
@@ -1,22 +1,21 @@
1
- yutipy/__init__.py,sha256=5_naWng1pAIg9e98eEdjsvom69cV3QXfmccVDSNZKCc,280
1
+ yutipy/__init__.py,sha256=qcQS17OJL9NNnQuT_gW5t6ygHawjHhqwz2hmjjDF__M,376
2
2
  yutipy/deezer.py,sha256=_-UtSq32FYqmMpmM4Y3S8KYjsxSC1tuU0jLyWZo7bBs,11409
3
3
  yutipy/exceptions.py,sha256=LdVYtmQLpX5is9iMsbjECxZYoBUdbtWR3nFN4SBVJOM,1362
4
4
  yutipy/itunes.py,sha256=IfJmAhd1OF-LOPYz4jsYOYrWqGV2hhBq8Y-ynOnohas,7934
5
5
  yutipy/kkbox.py,sha256=v21qcFzfH2Kg_dYGoEwtaBrWS3JejqpZdddeOqm2F_4,14196
6
- yutipy/logging.py,sha256=CcnaAZGClTUgfYqRXuVfFEhfMhlXF86di4r3O7aSHDA,107
7
6
  yutipy/models.py,sha256=vvWIA3MwCOOM2CBHSabqmFXz4NdVHaQtObU6zhGpJOM,1931
8
7
  yutipy/musicyt.py,sha256=gPbmhAaFa4PZ7xNNJkKnzcwnkqieOsTUcXgIenp41OM,9238
9
- yutipy/spotify.py,sha256=cZw7X4lVWNE_0IDN7yztNxUy33vU7TrWnz82kK2cUHE,16324
8
+ yutipy/spotify.py,sha256=BOPa-Gc_CZbZVf-soDxCPbEOUlRc3nIVBfvf5hluCUg,16482
10
9
  yutipy/yutipy_music.py,sha256=ec_a5QcygaSISV7OeOeYkMpwzE5YBeJjfobnQ4cb-Cw,6543
11
10
  yutipy/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
11
  yutipy/cli/config.py,sha256=6p69ZlT3ebUH5wzhd0iisLYKOnYX6xTSzoyrdBwGNo0,3230
13
12
  yutipy/cli/search.py,sha256=i2GkiKYnBewjJNu0WCqSfF7IVd0JtKwglUNk2tCLv2w,3031
14
- yutipy/utils/__init__.py,sha256=S28uLH8-WlytWHNabgeLNHx1emZVryBz0BDwF5wgum4,228
13
+ yutipy/utils/__init__.py,sha256=ehnqYct_hA5K5jXsHg3A9RNWFQLCTud86-WRhAbWOcQ,324
15
14
  yutipy/utils/helpers.py,sha256=W3g9iqoSygcFFCKCp2sk0NQrZOEG26wI2XuNi9pgAXE,5207
16
15
  yutipy/utils/logger.py,sha256=cHCjpDslVsBOnp7jluqrOOi4ekDIggPhbSfqHeIfT-U,1263
17
- yutipy-1.5.1.dist-info/licenses/LICENSE,sha256=_89JsS2QnBG8tAb5-VWbJDj_uJ002zPJAYBJJdh3DPY,1071
18
- yutipy-1.5.1.dist-info/METADATA,sha256=h7Ty2ILxjPwSUg8TjWLCwU3MBdyC4xBHOmc0VwAJgy8,6498
19
- yutipy-1.5.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
20
- yutipy-1.5.1.dist-info/entry_points.txt,sha256=BrgmanaPjQqKQ3Ip76JLcsPgGANtrBSURf5CNIxl1HA,106
21
- yutipy-1.5.1.dist-info/top_level.txt,sha256=t2A5V2_mUcfnHkbCy6tAQlb3909jDYU5GQgXtA4756I,7
22
- yutipy-1.5.1.dist-info/RECORD,,
16
+ yutipy-1.5.2.dist-info/licenses/LICENSE,sha256=_89JsS2QnBG8tAb5-VWbJDj_uJ002zPJAYBJJdh3DPY,1071
17
+ yutipy-1.5.2.dist-info/METADATA,sha256=vA7sievHdgl8izs_0UeniMImIfNkUIf1_QrHZsi2az8,6498
18
+ yutipy-1.5.2.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
19
+ yutipy-1.5.2.dist-info/entry_points.txt,sha256=BrgmanaPjQqKQ3Ip76JLcsPgGANtrBSURf5CNIxl1HA,106
20
+ yutipy-1.5.2.dist-info/top_level.txt,sha256=t2A5V2_mUcfnHkbCy6tAQlb3909jDYU5GQgXtA4756I,7
21
+ yutipy-1.5.2.dist-info/RECORD,,
yutipy/logging.py DELETED
@@ -1,3 +0,0 @@
1
- from .utils.logger import enable_logging, disable_logging
2
-
3
- __all__ = ["enable_logging", "disable_logging"]
File without changes