omnipython-applibs 0.1.2.dev16__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.
- appkit/__init__.py +52 -0
- appkit/__init__.pyi +17 -0
- appkit/data.py +149 -0
- appkit/data.pyi +25 -0
- appkit/foreground.py +357 -0
- appkit/foreground.pyi +45 -0
- appkit/home.py +19 -0
- appkit/home.pyi +8 -0
- appkit/hover.py +59 -0
- appkit/hover.pyi +13 -0
- appkit/index.py +199 -0
- appkit/index.pyi +30 -0
- appkit/launcher.py +1075 -0
- appkit/launcher.pyi +96 -0
- appkit/manifest.py +75 -0
- appkit/manifest.pyi +8 -0
- appkit/net.py +167 -0
- appkit/net.pyi +34 -0
- appkit/places.py +202 -0
- appkit/places.pyi +39 -0
- appkit/py.typed +0 -0
- appkit/scope.py +636 -0
- appkit/scope.pyi +110 -0
- appkit/shell.py +121 -0
- appkit/shell.pyi +32 -0
- appkit/worker.py +409 -0
- appkit/worker.pyi +83 -0
- controlkit/__init__.py +19 -0
- controlkit/__init__.pyi +10 -0
- controlkit/_draw.py +88 -0
- controlkit/_safe.py +29 -0
- controlkit/dotmatrix.py +101 -0
- controlkit/dotmatrix.pyi +23 -0
- controlkit/encoder.py +297 -0
- controlkit/encoder.pyi +55 -0
- controlkit/font5x7.py +22 -0
- controlkit/font5x7.pyi +11 -0
- controlkit/lamp_button.py +92 -0
- controlkit/lamp_button.pyi +40 -0
- controlkit/meter.py +86 -0
- controlkit/meter.pyi +30 -0
- controlkit/mock.py +116 -0
- controlkit/mock.pyi +35 -0
- controlkit/pad_grid.py +113 -0
- controlkit/pad_grid.pyi +41 -0
- controlkit/py.typed +0 -0
- controlkit/slider.py +185 -0
- controlkit/slider.pyi +49 -0
- controlkit/sprites.py +279 -0
- controlkit/sprites.pyi +22 -0
- controlkit/theme.py +120 -0
- controlkit/theme.pyi +15 -0
- deskkit/__init__.py +74 -0
- deskkit/__init__.pyi +18 -0
- deskkit/forecast.py +261 -0
- deskkit/forecast.pyi +40 -0
- deskkit/localtime.py +215 -0
- deskkit/localtime.pyi +33 -0
- deskkit/py.typed +0 -0
- deskkit/shell.py +113 -0
- deskkit/shell.pyi +33 -0
- omnipython_applibs-0.1.2.dev16.dist-info/METADATA +90 -0
- omnipython_applibs-0.1.2.dev16.dist-info/RECORD +143 -0
- omnipython_applibs-0.1.2.dev16.dist-info/WHEEL +5 -0
- omnipython_applibs-0.1.2.dev16.dist-info/licenses/LICENSE +21 -0
- omnipython_applibs-0.1.2.dev16.dist-info/top_level.txt +9 -0
- programkit/__init__.py +27 -0
- programkit/__init__.pyi +8 -0
- programkit/board.py +56 -0
- programkit/board.pyi +20 -0
- programkit/press.py +63 -0
- programkit/press.pyi +17 -0
- programkit/py.typed +0 -0
- programkit/rows.py +149 -0
- programkit/rows.pyi +34 -0
- sayso/__init__.py +109 -0
- sayso/__init__.pyi +124 -0
- sayso/auth.py +811 -0
- sayso/auth.pyi +102 -0
- sayso/client.py +1286 -0
- sayso/client.pyi +138 -0
- sayso/keepalive.py +371 -0
- sayso/keepalive.pyi +53 -0
- sayso/local.py +85 -0
- sayso/local.pyi +28 -0
- sayso/object_specs.py +706 -0
- sayso/object_specs.pyi +8 -0
- sayso/objects.py +411 -0
- sayso/objects.pyi +854 -0
- sayso/py.typed +0 -0
- sayso/schema_coverage.py +210 -0
- sayso/schema_coverage.pyi +13 -0
- sayso/transport.py +426 -0
- sayso/transport.pyi +47 -0
- songmodel/__init__.py +30 -0
- songmodel/__init__.pyi +9 -0
- songmodel/link.py +189 -0
- songmodel/link.pyi +53 -0
- songmodel/model.py +238 -0
- songmodel/model.pyi +40 -0
- songmodel/page.html +225 -0
- songmodel/page_data.py +236 -0
- songmodel/page_data.pyi +6 -0
- songmodel/py.typed +0 -0
- soundmodule/__init__.py +7 -0
- soundmodule/__init__.pyi +6 -0
- soundmodule/engine.py +1001 -0
- soundmodule/engine.pyi +196 -0
- soundmodule/names.py +298 -0
- soundmodule/names.pyi +30 -0
- soundmodule/pipes.py +105 -0
- soundmodule/pipes.pyi +31 -0
- soundmodule/py.typed +0 -0
- soundmodule/run.py +249 -0
- soundmodule/run.pyi +49 -0
- spectrum/__init__.py +72 -0
- spectrum/__init__.pyi +30 -0
- spectrum/analyzer.py +231 -0
- spectrum/analyzer.pyi +67 -0
- spectrum/fake_music.py +201 -0
- spectrum/fake_music.pyi +36 -0
- spectrum/pump_levels.py +126 -0
- spectrum/pump_levels.pyi +46 -0
- spectrum/py.typed +0 -0
- spectrum/spectrum_view.py +403 -0
- spectrum/spectrum_view.pyi +80 -0
- touchkit/__init__.py +4 -0
- touchkit/__init__.pyi +4 -0
- touchkit/cam.py +146 -0
- touchkit/cam.pyi +35 -0
- touchkit/clock.py +18 -0
- touchkit/clock.pyi +6 -0
- touchkit/ecp.py +134 -0
- touchkit/ecp.pyi +28 -0
- touchkit/net.py +347 -0
- touchkit/net.pyi +27 -0
- touchkit/py.typed +0 -0
- touchkit/settings.py +85 -0
- touchkit/settings.pyi +17 -0
- touchkit/shell.py +268 -0
- touchkit/shell.pyi +42 -0
- touchkit/ui.py +167 -0
- touchkit/ui.pyi +53 -0
sayso/auth.pyi
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: 2026 Brad Barnett
|
|
2
|
+
#
|
|
3
|
+
# SPDX-License-Identifier: MIT
|
|
4
|
+
"""Spotify OAuth: client credentials, authorization code with PKCE, token cache and config file."""
|
|
5
|
+
|
|
6
|
+
from collections.abc import Iterable, Mapping
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
from .transport import TransportError as TransportError, post_form_json as post_form_json, query_string as query_string, unquote_plus as unquote_plus
|
|
10
|
+
|
|
11
|
+
TOKEN_URL: str
|
|
12
|
+
AUTHORIZE_URL: str
|
|
13
|
+
|
|
14
|
+
class SpotifyAuthError(Exception):
|
|
15
|
+
"""An OAuth request failed or was rejected."""
|
|
16
|
+
|
|
17
|
+
class TokenCache:
|
|
18
|
+
"""Stores access and refresh tokens in a JSON file."""
|
|
19
|
+
|
|
20
|
+
path: str
|
|
21
|
+
def __init__(self, path: str = 'tokens.json') -> None: ...
|
|
22
|
+
def load(self) -> dict[str, Any]: ...
|
|
23
|
+
def save(self, data: Mapping[str, Any]) -> bool: ...
|
|
24
|
+
def load_auth(self, auth: AuthorizationCodeAuth) -> AuthorizationCodeAuth: ...
|
|
25
|
+
def save_auth(self, auth: AuthorizationCodeAuth) -> bool: ...
|
|
26
|
+
|
|
27
|
+
class ClientCredentialsAuth:
|
|
28
|
+
"""App-only authorization (no user)."""
|
|
29
|
+
|
|
30
|
+
client_id: str
|
|
31
|
+
client_secret: str
|
|
32
|
+
access_token: str | None
|
|
33
|
+
expires_at: float
|
|
34
|
+
def __init__(self, client_id: str, client_secret: str) -> None: ...
|
|
35
|
+
def token(self) -> str: ...
|
|
36
|
+
def refresh(self) -> str: ...
|
|
37
|
+
|
|
38
|
+
class AuthorizationCodeAuth:
|
|
39
|
+
"""User authorization with the authorization code flow, optionally with PKCE."""
|
|
40
|
+
|
|
41
|
+
client_id: str
|
|
42
|
+
client_secret: str
|
|
43
|
+
redirect_uri: str
|
|
44
|
+
scope: str | Iterable[str] | None
|
|
45
|
+
refresh_token: str | None
|
|
46
|
+
code_verifier: str | None
|
|
47
|
+
token_cache: TokenCache | None
|
|
48
|
+
access_token: str | None
|
|
49
|
+
expires_at: float
|
|
50
|
+
def __init__(self, client_id: str, client_secret: str, redirect_uri: str, scope: str | Iterable[str] | None = None, refresh_token: str | None = None, code_verifier: str | None = None, token_cache: TokenCache | None = None) -> None: ...
|
|
51
|
+
def authorize_url(self, state: str | None = None, show_dialog: bool | None = None, code_challenge: str | None = None, code_challenge_method: str | None = None) -> str: ...
|
|
52
|
+
def token(self) -> str: ...
|
|
53
|
+
def exchange_code(self, code: str) -> str: ...
|
|
54
|
+
def exchange_callback_url(self, callback_url: str, expected_state: str | None = None) -> str: ...
|
|
55
|
+
def refresh(self) -> str: ...
|
|
56
|
+
|
|
57
|
+
def post_oauth_token(client_id: str, client_secret: str, data: Mapping[str, Any]) -> Any: ...
|
|
58
|
+
def oauth_error_from_transport(error: TransportError) -> SpotifyAuthError: ...
|
|
59
|
+
def authorization_url(client_id: str, redirect_uri: str, scope: str | Iterable[str] | None = None, state: str | None = None, show_dialog: bool | None = None, code_challenge: str | None = None, code_challenge_method: str | None = None) -> str: ...
|
|
60
|
+
def parse_callback_url(callback_url: str) -> dict[str, str]: ...
|
|
61
|
+
def generate_code_verifier(length: int = 64) -> str: ...
|
|
62
|
+
def code_challenge_s256(code_verifier: str) -> str: ...
|
|
63
|
+
def pkce_pair(length: int = 64) -> tuple[str, str]: ...
|
|
64
|
+
def random_bytes_for_verifier(length: int) -> bytes: ...
|
|
65
|
+
def base64_urlsafe(data: bytes) -> str: ...
|
|
66
|
+
def join_scope(scope: str | Iterable[str] | None) -> str | None: ...
|
|
67
|
+
def bool_string(value: object) -> str | None: ...
|
|
68
|
+
def add_query(query: dict[str, Any], key: str, value: Any) -> None: ...
|
|
69
|
+
def basic_token(client_id: str, client_secret: str) -> str: ...
|
|
70
|
+
|
|
71
|
+
DEFAULT_CONFIG_PATH: str
|
|
72
|
+
DEFAULT_TOKEN_CACHE_PATH: str
|
|
73
|
+
DEFAULT_REDIRECT_URI: str
|
|
74
|
+
USER_PROFILE_SCOPES: tuple[str, ...]
|
|
75
|
+
LIBRARY_READ_SCOPES: tuple[str, ...]
|
|
76
|
+
LIBRARY_WRITE_SCOPES: tuple[str, ...]
|
|
77
|
+
PLAYLIST_READ_SCOPES: tuple[str, ...]
|
|
78
|
+
PLAYLIST_WRITE_SCOPES: tuple[str, ...]
|
|
79
|
+
PLAYBACK_READ_SCOPES: tuple[str, ...]
|
|
80
|
+
PLAYBACK_WRITE_SCOPES: tuple[str, ...]
|
|
81
|
+
FOLLOW_WRITE_SCOPES: tuple[str, ...]
|
|
82
|
+
EXAMPLE_SCOPES: tuple[str, ...]
|
|
83
|
+
|
|
84
|
+
class SpotifyConfigError(SpotifyAuthError):
|
|
85
|
+
"""The config file is missing or incomplete."""
|
|
86
|
+
|
|
87
|
+
def load_config(path: str | None = None) -> dict[str, Any]: ...
|
|
88
|
+
def save_config(data: Mapping[str, Any], path: str | None = None) -> bool: ...
|
|
89
|
+
def config_available(path: str | None = None) -> bool: ...
|
|
90
|
+
def credentials_from_config(config: Mapping[str, Any]) -> tuple[str, str]: ...
|
|
91
|
+
def redirect_uri_from_config(config: Mapping[str, Any], cached: Mapping[str, Any] | None = None) -> str: ...
|
|
92
|
+
def scopes_from_config(config: Mapping[str, Any], cached: Mapping[str, Any] | None = None) -> list[str]: ...
|
|
93
|
+
def token_cache_from_config(config: Mapping[str, Any]) -> TokenCache: ...
|
|
94
|
+
def config_value(config: Mapping[str, Any], key: str, default: Any = None) -> Any: ...
|
|
95
|
+
def auth_from_config(config_path: str | None = None, scope: str | Iterable[str] | None = None, authenticate_if_needed: bool = True, auth_state: str = 'sayso') -> AuthorizationCodeAuth: ...
|
|
96
|
+
def authorize_with_local_server(auth: AuthorizationCodeAuth, redirect_uri: str, state: str = 'sayso', message: str = 'Spotify authorization received. You can close this window.', open_browser: bool = True) -> str: ...
|
|
97
|
+
def print_authorize_instructions(url: str, redirect_uri: str, open_browser: bool = True) -> None: ...
|
|
98
|
+
def try_open_browser(url: str) -> bool: ...
|
|
99
|
+
def wait_for_oauth_callback(host: str, port: int, message: str, redirect_uri: str) -> str: ...
|
|
100
|
+
def wait_for_oauth_callback_socket(host: str, port: int, message: str, redirect_uri: str) -> str: ...
|
|
101
|
+
def running_on_wsl() -> bool: ...
|
|
102
|
+
def redirect_uri_host_port(redirect_uri: str) -> tuple[str, int]: ...
|