sweatstack 0.51.0__tar.gz → 0.53.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.
Files changed (29) hide show
  1. {sweatstack-0.51.0 → sweatstack-0.53.0}/CHANGELOG.md +13 -0
  2. {sweatstack-0.51.0 → sweatstack-0.53.0}/PKG-INFO +1 -1
  3. {sweatstack-0.51.0 → sweatstack-0.53.0}/pyproject.toml +1 -1
  4. {sweatstack-0.51.0 → sweatstack-0.53.0}/src/sweatstack/client.py +6 -2
  5. {sweatstack-0.51.0 → sweatstack-0.53.0}/.claude/settings.local.json +0 -0
  6. {sweatstack-0.51.0 → sweatstack-0.53.0}/.gitignore +0 -0
  7. {sweatstack-0.51.0 → sweatstack-0.53.0}/.python-version +0 -0
  8. {sweatstack-0.51.0 → sweatstack-0.53.0}/DEVELOPMENT.md +0 -0
  9. {sweatstack-0.51.0 → sweatstack-0.53.0}/Makefile +0 -0
  10. {sweatstack-0.51.0 → sweatstack-0.53.0}/README.md +0 -0
  11. {sweatstack-0.51.0 → sweatstack-0.53.0}/playground/.ipynb_checkpoints/Untitled-checkpoint.ipynb +0 -0
  12. {sweatstack-0.51.0 → sweatstack-0.53.0}/playground/README.md +0 -0
  13. {sweatstack-0.51.0 → sweatstack-0.53.0}/playground/Sweat Stack examples/Getting started.ipynb +0 -0
  14. {sweatstack-0.51.0 → sweatstack-0.53.0}/playground/Untitled.ipynb +0 -0
  15. {sweatstack-0.51.0 → sweatstack-0.53.0}/playground/hello.py +0 -0
  16. {sweatstack-0.51.0 → sweatstack-0.53.0}/playground/pyproject.toml +0 -0
  17. {sweatstack-0.51.0 → sweatstack-0.53.0}/src/sweatstack/Sweat Stack examples/Getting started.ipynb +0 -0
  18. {sweatstack-0.51.0 → sweatstack-0.53.0}/src/sweatstack/__init__.py +0 -0
  19. {sweatstack-0.51.0 → sweatstack-0.53.0}/src/sweatstack/cli.py +0 -0
  20. {sweatstack-0.51.0 → sweatstack-0.53.0}/src/sweatstack/constants.py +0 -0
  21. {sweatstack-0.51.0 → sweatstack-0.53.0}/src/sweatstack/ipython_init.py +0 -0
  22. {sweatstack-0.51.0 → sweatstack-0.53.0}/src/sweatstack/jupyterlab_oauth2_startup.py +0 -0
  23. {sweatstack-0.51.0 → sweatstack-0.53.0}/src/sweatstack/openapi_schemas.py +0 -0
  24. {sweatstack-0.51.0 → sweatstack-0.53.0}/src/sweatstack/py.typed +0 -0
  25. {sweatstack-0.51.0 → sweatstack-0.53.0}/src/sweatstack/schemas.py +0 -0
  26. {sweatstack-0.51.0 → sweatstack-0.53.0}/src/sweatstack/streamlit.py +0 -0
  27. {sweatstack-0.51.0 → sweatstack-0.53.0}/src/sweatstack/sweatshell.py +0 -0
  28. {sweatstack-0.51.0 → sweatstack-0.53.0}/src/sweatstack/utils.py +0 -0
  29. {sweatstack-0.51.0 → sweatstack-0.53.0}/uv.lock +0 -0
@@ -6,6 +6,19 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
8
 
9
+ ## [0.53.0] - 2025-09-11
10
+
11
+ ### Added
12
+
13
+ - Added a new `sport` parameter to the `ss.create_trace()` method that allows for associating a trace with a specific sport.
14
+
15
+
16
+ ## [0.52.0] - 2025-09-10
17
+
18
+ ### Changed
19
+ - Changed the default timeout for the HTTP client to 60 seconds.
20
+
21
+
9
22
  ## [0.51.0] - 2025-08-28
10
23
 
11
24
  ### Added
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sweatstack
3
- Version: 0.51.0
3
+ Version: 0.53.0
4
4
  Summary: The official Python client for SweatStack
5
5
  Author-email: Aart Goossens <aart@gssns.io>
6
6
  Requires-Python: >=3.9
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "sweatstack"
3
- version = "0.51.0"
3
+ version = "0.53.0"
4
4
  description = "The official Python client for SweatStack"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -259,7 +259,7 @@ class OAuth2Mixin:
259
259
  "client_id": OAUTH2_CLIENT_ID,
260
260
  "redirect_uri": redirect_uri,
261
261
  "code_challenge": code_challenge,
262
- "scope": "data:read profile",
262
+ "scope": "data:read data:write profile",
263
263
  "prompt": "none",
264
264
  }
265
265
  base_url = self.url
@@ -647,7 +647,7 @@ class Client(OAuth2Mixin, DelegationMixin, TokenStorageMixin, LocalCacheMixin):
647
647
  if self.api_key:
648
648
  headers["Authorization"] = f"Bearer {self.api_key}"
649
649
 
650
- with httpx.Client(base_url=self.url, headers=headers) as client:
650
+ with httpx.Client(base_url=self.url, headers=headers, timeout=60) as client:
651
651
  yield client
652
652
 
653
653
  def _print_response_and_raise(self, response: httpx.Response):
@@ -1212,6 +1212,7 @@ class Client(OAuth2Mixin, DelegationMixin, TokenStorageMixin, LocalCacheMixin):
1212
1212
  speed: float | None = None,
1213
1213
  heart_rate: int | None = None,
1214
1214
  tags: list[str] | None = None,
1215
+ sport: Sport | str | None = None,
1215
1216
  ) -> TraceDetails:
1216
1217
  """Creates a new trace with the specified parameters.
1217
1218
 
@@ -1227,6 +1228,7 @@ class Client(OAuth2Mixin, DelegationMixin, TokenStorageMixin, LocalCacheMixin):
1227
1228
  speed: Optional speed measurement in meters per second.
1228
1229
  heart_rate: Optional heart rate measurement in beats per minute.
1229
1230
  tags: Optional list of tags to associate with this trace.
1231
+ sport: Optional sport to associate with this trace.
1230
1232
 
1231
1233
  Returns:
1232
1234
  TraceDetails: The created trace object with all details.
@@ -1234,6 +1236,7 @@ class Client(OAuth2Mixin, DelegationMixin, TokenStorageMixin, LocalCacheMixin):
1234
1236
  Raises:
1235
1237
  HTTPStatusError: If the API request fails.
1236
1238
  """
1239
+ sport = self._enums_to_strings([sport])[0] if sport else None
1237
1240
  with self._http_client() as client:
1238
1241
  response = client.post(
1239
1242
  url="/api/v1/traces/",
@@ -1246,6 +1249,7 @@ class Client(OAuth2Mixin, DelegationMixin, TokenStorageMixin, LocalCacheMixin):
1246
1249
  "speed": speed,
1247
1250
  "heart_rate": heart_rate,
1248
1251
  "tags": tags,
1252
+ "sport": sport,
1249
1253
  },
1250
1254
  )
1251
1255
  self._raise_for_status(response)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes