yutipy 1.5.1__tar.gz → 1.5.2__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.
Potentially problematic release.
This version of yutipy might be problematic. Click here for more details.
- {yutipy-1.5.1 → yutipy-1.5.2}/PKG-INFO +1 -1
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy/__init__.py +3 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy/spotify.py +4 -4
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy/utils/__init__.py +4 -1
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy.egg-info/PKG-INFO +1 -1
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy.egg-info/SOURCES.txt +0 -1
- yutipy-1.5.1/yutipy/logging.py +0 -3
- {yutipy-1.5.1 → yutipy-1.5.2}/.gitattributes +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/.github/FUNDING.yml +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/.github/workflows/pytest-unit-testing.yml +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/.github/workflows/release.yml +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/.gitignore +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/.readthedocs.yaml +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/LICENSE +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/MANIFEST.in +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/README.md +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/docs/Makefile +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/docs/_static/yutipy_header.png +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/docs/_static/yutipy_logo.png +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/docs/api_reference.rst +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/docs/available_platforms.rst +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/docs/cli.rst +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/docs/conf.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/docs/faq.rst +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/docs/index.rst +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/docs/installation.rst +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/docs/make.bat +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/docs/requirements.txt +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/docs/usage_examples.rst +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/pyproject.toml +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/requirements-dev.txt +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/requirements.txt +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/setup.cfg +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/tests/__init__.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/tests/test_deezer.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/tests/test_itunes.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/tests/test_kkbox.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/tests/test_models.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/tests/test_musicyt.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/tests/test_spotify.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/tests/test_utils.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/tests/test_yutipy_music.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy/cli/__init__.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy/cli/config.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy/cli/search.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy/deezer.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy/exceptions.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy/itunes.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy/kkbox.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy/models.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy/musicyt.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy/utils/helpers.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy/utils/logger.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy/yutipy_music.py +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy.egg-info/dependency_links.txt +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy.egg-info/entry_points.txt +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy.egg-info/requires.txt +0 -0
- {yutipy-1.5.1 → yutipy-1.5.2}/yutipy.egg-info/top_level.txt +0 -0
|
@@ -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
|
]
|
|
@@ -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
|
|
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
|
|
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(
|
|
@@ -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
|
]
|
yutipy-1.5.1/yutipy/logging.py
DELETED
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|