sweatstack 0.11.1__py3-none-any.whl → 0.12.0__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.
@@ -0,0 +1,85 @@
1
+ Metadata-Version: 2.4
2
+ Name: sweatstack
3
+ Version: 0.12.0
4
+ Summary: The official Python client for SweatStack
5
+ Author-email: Aart Goossens <aart@gssns.io>
6
+ Requires-Python: >=3.12
7
+ Requires-Dist: httpx>=0.28.1
8
+ Requires-Dist: pandas>=2.2.3
9
+ Requires-Dist: pyarrow>=19.0.0
10
+ Requires-Dist: pydantic>=2.10.5
11
+ Provides-Extra: jupyterlab
12
+ Requires-Dist: ipython>=8.31.0; extra == 'jupyterlab'
13
+ Requires-Dist: jupyterlab>=4.3.4; extra == 'jupyterlab'
14
+ Requires-Dist: matplotlib; extra == 'jupyterlab'
15
+ Description-Content-Type: text/markdown
16
+
17
+ # SweatStack Python client library
18
+
19
+
20
+ # Quickstart
21
+
22
+ ```
23
+ uv pip install sweatstack
24
+ ```
25
+
26
+ ```python
27
+ import sweatstack as ss
28
+
29
+ ss.login()
30
+
31
+ ss.list_activities()
32
+ ```
33
+
34
+
35
+ # Authentication
36
+
37
+ SweatStack supports three authentication methods:
38
+
39
+ ### 1. Browser-Based OAuth2 Authentication
40
+ ```python
41
+ ss.login() # Opens your default browser for authentication
42
+ ```
43
+
44
+ ### 2. Direct API Key Authentication
45
+ ```python
46
+ client = ss.Client(api_key="your-api-key")
47
+ ```
48
+
49
+ ### 3. Environment Variable
50
+ Set the `SWEATSTACK_API_KEY` environment variable:
51
+ ```bash
52
+ export SWEATSTACK_API_KEY="your-api-key"
53
+ ```
54
+
55
+ SweatStack follows this priority order:
56
+
57
+ 1. Browser-based OAuth2 (`ss.login()`)
58
+ 2. Direct API key via `Client` constructor
59
+ 3. `SWEATSTACK_API_KEY` environment variable
60
+
61
+ For example, calling `ss.login()` or `client.login()` will override any existing API key authentication, including those set through the constructor or environment variables.
62
+
63
+
64
+ ## Interfaces: Singleton vs Class-based
65
+
66
+ This library provides both a singleton interface and a class-based interface.
67
+
68
+ Singleton interface:
69
+ ```python
70
+ import sweatstack as ss
71
+
72
+ activities = ss.list_activities()
73
+ ```
74
+
75
+ Class-based interface:
76
+ ```python
77
+ from sweatstack import Client
78
+
79
+ client = Client()
80
+ activities = client.list_activities()
81
+ ```
82
+
83
+ Although both interfaces are feature-equivalent, they serve different purposes:
84
+ - The singleton interface is the default and recommended interface. It is intended for most use cases and is the easiest to use.
85
+ - The class-based interface is intended for more advanced use cases, such as when you need to authenticate multiple users at the same time or in multi-threaded applications.
@@ -0,0 +1,14 @@
1
+ sweatstack/__init__.py,sha256=tiVfgKlswRPaDMEy0gA7u8rveqEYZTA_kyB9lJ3J6Sc,21
2
+ sweatstack/cli.py,sha256=N1NWOgEZR2yaJvIXxo9qvp_jFlypZYb0nujpbVNYQ6A,720
3
+ sweatstack/client.py,sha256=-dE1t55kJkmo8QCUNeftHu-5FT_hOh9k4azQUq8gL6c,19131
4
+ sweatstack/ipython_init.py,sha256=zBGUlMFkdpLvsNpOpwrNaKRUpUZhzaICvH8ODJgMPcI,229
5
+ sweatstack/jupyterlab_oauth2_startup.py,sha256=eZ6xi0Sa4hO4vUanimq0SqjduHtiywCURSDNWk_I-7s,1200
6
+ sweatstack/openapi_schemas.py,sha256=vtYHa6A0kADFbd_jK1O7Kbn8YkbPfzaIwsRDDYjYeSA,13038
7
+ sweatstack/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ sweatstack/schemas.py,sha256=CdkeV6IRmIuvxae7C5dz-hVlb6hkzEYfqKHHgVJprmY,90
9
+ sweatstack/sweatshell.py,sha256=MYLNcWbOdceqKJ3S0Pe8dwHXEeYsGJNjQoYUXpMTftA,333
10
+ sweatstack/utils.py,sha256=0DcvHV1EOHQnN5OlfYo2DRrw8a9-6YkxTjLVCfi5ylE,277
11
+ sweatstack-0.12.0.dist-info/METADATA,sha256=Y5-IDBEV8SgHd8uuDQgIBUzo0t9I0o2FpoFuZDEOFEs,2165
12
+ sweatstack-0.12.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
13
+ sweatstack-0.12.0.dist-info/entry_points.txt,sha256=kCzOUQI3dqbTpEYqtgYDeiKFaqaA7BMlV6D24BMzCFU,208
14
+ sweatstack-0.12.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.25.0
2
+ Generator: hatchling 1.27.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any