sweatstack 0.30.0__tar.gz → 0.31.0__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.
- {sweatstack-0.30.0 → sweatstack-0.31.0}/PKG-INFO +1 -1
- {sweatstack-0.30.0 → sweatstack-0.31.0}/pyproject.toml +1 -1
- {sweatstack-0.30.0 → sweatstack-0.31.0}/src/sweatstack/client.py +11 -1
- {sweatstack-0.30.0 → sweatstack-0.31.0}/.gitignore +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/.python-version +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/DEVELOPMENT.md +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/Makefile +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/README.md +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/playground/.ipynb_checkpoints/Untitled-checkpoint.ipynb +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/playground/README.md +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/playground/Sweat Stack examples/Getting started.ipynb +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/playground/Untitled.ipynb +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/playground/hello.py +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/playground/pyproject.toml +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/src/sweatstack/Sweat Stack examples/Getting started.ipynb +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/src/sweatstack/__init__.py +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/src/sweatstack/cli.py +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/src/sweatstack/constants.py +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/src/sweatstack/ipython_init.py +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/src/sweatstack/jupyterlab_oauth2_startup.py +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/src/sweatstack/openapi_schemas.py +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/src/sweatstack/py.typed +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/src/sweatstack/schemas.py +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/src/sweatstack/streamlit.py +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/src/sweatstack/sweatshell.py +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/src/sweatstack/utils.py +0 -0
- {sweatstack-0.30.0 → sweatstack-0.31.0}/uv.lock +0 -0
|
@@ -10,6 +10,7 @@ import webbrowser
|
|
|
10
10
|
from datetime import date, datetime
|
|
11
11
|
from functools import wraps
|
|
12
12
|
from http.server import BaseHTTPRequestHandler, HTTPServer
|
|
13
|
+
from importlib.metadata import version
|
|
13
14
|
from io import BytesIO
|
|
14
15
|
from typing import Any, Generator, get_type_hints, List, Literal
|
|
15
16
|
from urllib.parse import parse_qs, urlparse
|
|
@@ -42,6 +43,12 @@ AUTH_SUCCESSFUL_RESPONSE = """<!DOCTYPE html>
|
|
|
42
43
|
OAUTH2_CLIENT_ID = "5382f68b0d254378"
|
|
43
44
|
|
|
44
45
|
|
|
46
|
+
try:
|
|
47
|
+
__version__ = version("python-sweatstack")
|
|
48
|
+
except ImportError:
|
|
49
|
+
__version__ = "unknown"
|
|
50
|
+
|
|
51
|
+
|
|
45
52
|
class OAuth2Mixin:
|
|
46
53
|
def login(self):
|
|
47
54
|
class AuthHandler(BaseHTTPRequestHandler):
|
|
@@ -270,7 +277,9 @@ class Client(OAuth2Mixin, DelegationMixin):
|
|
|
270
277
|
"""
|
|
271
278
|
Creates an httpx client with the base URL and authentication headers pre-configured.
|
|
272
279
|
"""
|
|
273
|
-
headers = {
|
|
280
|
+
headers = {
|
|
281
|
+
"User-Agent": f"python-sweatstack/{__version__}",
|
|
282
|
+
}
|
|
274
283
|
if self.api_key:
|
|
275
284
|
headers["Authorization"] = f"Bearer {self.api_key}"
|
|
276
285
|
|
|
@@ -517,6 +526,7 @@ class Client(OAuth2Mixin, DelegationMixin):
|
|
|
517
526
|
if end is not None:
|
|
518
527
|
params["end"] = end.isoformat()
|
|
519
528
|
if sports is not None:
|
|
529
|
+
sports = [sport.value if isinstance(sport, Sport) else sport for sport in sports]
|
|
520
530
|
params["sports"] = sports
|
|
521
531
|
if tags is not None:
|
|
522
532
|
params["tags"] = tags
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sweatstack-0.30.0 → sweatstack-0.31.0}/playground/.ipynb_checkpoints/Untitled-checkpoint.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
{sweatstack-0.30.0 → sweatstack-0.31.0}/playground/Sweat Stack examples/Getting started.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sweatstack-0.30.0 → sweatstack-0.31.0}/src/sweatstack/Sweat Stack examples/Getting started.ipynb
RENAMED
|
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
|