omnipython-applibs 0.1.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.
Files changed (143) hide show
  1. appkit/__init__.py +52 -0
  2. appkit/__init__.pyi +17 -0
  3. appkit/data.py +149 -0
  4. appkit/data.pyi +25 -0
  5. appkit/foreground.py +357 -0
  6. appkit/foreground.pyi +45 -0
  7. appkit/home.py +19 -0
  8. appkit/home.pyi +8 -0
  9. appkit/hover.py +59 -0
  10. appkit/hover.pyi +13 -0
  11. appkit/index.py +199 -0
  12. appkit/index.pyi +30 -0
  13. appkit/launcher.py +1075 -0
  14. appkit/launcher.pyi +96 -0
  15. appkit/manifest.py +75 -0
  16. appkit/manifest.pyi +8 -0
  17. appkit/net.py +167 -0
  18. appkit/net.pyi +34 -0
  19. appkit/places.py +202 -0
  20. appkit/places.pyi +39 -0
  21. appkit/py.typed +0 -0
  22. appkit/scope.py +636 -0
  23. appkit/scope.pyi +110 -0
  24. appkit/shell.py +121 -0
  25. appkit/shell.pyi +32 -0
  26. appkit/worker.py +409 -0
  27. appkit/worker.pyi +83 -0
  28. controlkit/__init__.py +19 -0
  29. controlkit/__init__.pyi +10 -0
  30. controlkit/_draw.py +88 -0
  31. controlkit/_safe.py +29 -0
  32. controlkit/dotmatrix.py +101 -0
  33. controlkit/dotmatrix.pyi +23 -0
  34. controlkit/encoder.py +297 -0
  35. controlkit/encoder.pyi +55 -0
  36. controlkit/font5x7.py +22 -0
  37. controlkit/font5x7.pyi +11 -0
  38. controlkit/lamp_button.py +92 -0
  39. controlkit/lamp_button.pyi +40 -0
  40. controlkit/meter.py +86 -0
  41. controlkit/meter.pyi +30 -0
  42. controlkit/mock.py +116 -0
  43. controlkit/mock.pyi +35 -0
  44. controlkit/pad_grid.py +113 -0
  45. controlkit/pad_grid.pyi +41 -0
  46. controlkit/py.typed +0 -0
  47. controlkit/slider.py +185 -0
  48. controlkit/slider.pyi +49 -0
  49. controlkit/sprites.py +279 -0
  50. controlkit/sprites.pyi +22 -0
  51. controlkit/theme.py +120 -0
  52. controlkit/theme.pyi +15 -0
  53. deskkit/__init__.py +74 -0
  54. deskkit/__init__.pyi +18 -0
  55. deskkit/forecast.py +261 -0
  56. deskkit/forecast.pyi +40 -0
  57. deskkit/localtime.py +215 -0
  58. deskkit/localtime.pyi +33 -0
  59. deskkit/py.typed +0 -0
  60. deskkit/shell.py +113 -0
  61. deskkit/shell.pyi +33 -0
  62. omnipython_applibs-0.1.2.dist-info/METADATA +90 -0
  63. omnipython_applibs-0.1.2.dist-info/RECORD +143 -0
  64. omnipython_applibs-0.1.2.dist-info/WHEEL +5 -0
  65. omnipython_applibs-0.1.2.dist-info/licenses/LICENSE +21 -0
  66. omnipython_applibs-0.1.2.dist-info/top_level.txt +9 -0
  67. programkit/__init__.py +27 -0
  68. programkit/__init__.pyi +8 -0
  69. programkit/board.py +56 -0
  70. programkit/board.pyi +20 -0
  71. programkit/press.py +63 -0
  72. programkit/press.pyi +17 -0
  73. programkit/py.typed +0 -0
  74. programkit/rows.py +149 -0
  75. programkit/rows.pyi +34 -0
  76. sayso/__init__.py +109 -0
  77. sayso/__init__.pyi +124 -0
  78. sayso/auth.py +811 -0
  79. sayso/auth.pyi +102 -0
  80. sayso/client.py +1286 -0
  81. sayso/client.pyi +138 -0
  82. sayso/keepalive.py +371 -0
  83. sayso/keepalive.pyi +53 -0
  84. sayso/local.py +85 -0
  85. sayso/local.pyi +28 -0
  86. sayso/object_specs.py +706 -0
  87. sayso/object_specs.pyi +8 -0
  88. sayso/objects.py +411 -0
  89. sayso/objects.pyi +854 -0
  90. sayso/py.typed +0 -0
  91. sayso/schema_coverage.py +210 -0
  92. sayso/schema_coverage.pyi +13 -0
  93. sayso/transport.py +426 -0
  94. sayso/transport.pyi +47 -0
  95. songmodel/__init__.py +30 -0
  96. songmodel/__init__.pyi +9 -0
  97. songmodel/link.py +189 -0
  98. songmodel/link.pyi +53 -0
  99. songmodel/model.py +238 -0
  100. songmodel/model.pyi +40 -0
  101. songmodel/page.html +225 -0
  102. songmodel/page_data.py +236 -0
  103. songmodel/page_data.pyi +6 -0
  104. songmodel/py.typed +0 -0
  105. soundmodule/__init__.py +7 -0
  106. soundmodule/__init__.pyi +6 -0
  107. soundmodule/engine.py +1001 -0
  108. soundmodule/engine.pyi +196 -0
  109. soundmodule/names.py +298 -0
  110. soundmodule/names.pyi +30 -0
  111. soundmodule/pipes.py +105 -0
  112. soundmodule/pipes.pyi +31 -0
  113. soundmodule/py.typed +0 -0
  114. soundmodule/run.py +249 -0
  115. soundmodule/run.pyi +49 -0
  116. spectrum/__init__.py +72 -0
  117. spectrum/__init__.pyi +30 -0
  118. spectrum/analyzer.py +231 -0
  119. spectrum/analyzer.pyi +67 -0
  120. spectrum/fake_music.py +201 -0
  121. spectrum/fake_music.pyi +36 -0
  122. spectrum/pump_levels.py +126 -0
  123. spectrum/pump_levels.pyi +46 -0
  124. spectrum/py.typed +0 -0
  125. spectrum/spectrum_view.py +403 -0
  126. spectrum/spectrum_view.pyi +80 -0
  127. touchkit/__init__.py +4 -0
  128. touchkit/__init__.pyi +4 -0
  129. touchkit/cam.py +146 -0
  130. touchkit/cam.pyi +35 -0
  131. touchkit/clock.py +18 -0
  132. touchkit/clock.pyi +6 -0
  133. touchkit/ecp.py +134 -0
  134. touchkit/ecp.pyi +28 -0
  135. touchkit/net.py +347 -0
  136. touchkit/net.pyi +27 -0
  137. touchkit/py.typed +0 -0
  138. touchkit/settings.py +85 -0
  139. touchkit/settings.pyi +17 -0
  140. touchkit/shell.py +268 -0
  141. touchkit/shell.pyi +42 -0
  142. touchkit/ui.py +167 -0
  143. 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]: ...