sweatstack 0.49.0__tar.gz → 0.51.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.51.0/.claude/settings.local.json +9 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/CHANGELOG.md +14 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/PKG-INFO +1 -1
- {sweatstack-0.49.0 → sweatstack-0.51.0}/pyproject.toml +1 -1
- {sweatstack-0.49.0 → sweatstack-0.51.0}/src/sweatstack/client.py +10 -2
- {sweatstack-0.49.0 → sweatstack-0.51.0}/src/sweatstack/streamlit.py +4 -3
- sweatstack-0.49.0/.claude/settings.local.json +0 -8
- {sweatstack-0.49.0 → sweatstack-0.51.0}/.gitignore +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/.python-version +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/DEVELOPMENT.md +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/Makefile +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/README.md +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/playground/.ipynb_checkpoints/Untitled-checkpoint.ipynb +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/playground/README.md +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/playground/Sweat Stack examples/Getting started.ipynb +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/playground/Untitled.ipynb +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/playground/hello.py +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/playground/pyproject.toml +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/src/sweatstack/Sweat Stack examples/Getting started.ipynb +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/src/sweatstack/__init__.py +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/src/sweatstack/cli.py +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/src/sweatstack/constants.py +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/src/sweatstack/ipython_init.py +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/src/sweatstack/jupyterlab_oauth2_startup.py +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/src/sweatstack/openapi_schemas.py +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/src/sweatstack/py.typed +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/src/sweatstack/schemas.py +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/src/sweatstack/sweatshell.py +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/src/sweatstack/utils.py +0 -0
- {sweatstack-0.49.0 → sweatstack-0.51.0}/uv.lock +0 -0
|
@@ -6,6 +6,20 @@ 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.51.0] - 2025-08-28
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Added a new `show_logout` parameter to the `ss.StreamlitAuth.authenticate()` method that allows for disabling the logout button. The logout button can be shown by calling `ss.StreamlitAuth.logout_button()`. This is for example useful when you want to show the login button on the main page, but the logout button in the sidebar.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## [0.50.0] - 2025-08-25
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- Added a new `offset` parameter to the `ss.get_activities()`, `ss.get_activity_data()`, `ss.get_latest_activity_data()`, `ss.get_traces()`, and `ss.get_trace_data()` methods that allows for pagination of the results.
|
|
21
|
+
|
|
22
|
+
|
|
9
23
|
## [0.49.0] - 2025-08-18
|
|
10
24
|
|
|
11
25
|
### Added
|
|
@@ -692,12 +692,13 @@ class Client(OAuth2Mixin, DelegationMixin, TokenStorageMixin, LocalCacheMixin):
|
|
|
692
692
|
sports: list[Sport | str] | None = None,
|
|
693
693
|
tags: list[str] | None = None,
|
|
694
694
|
limit: int = 100,
|
|
695
|
+
offset: int = 0,
|
|
695
696
|
) -> Generator[ActivitySummary, None, None]:
|
|
696
697
|
num_returned = 0
|
|
697
698
|
default_limit = 100
|
|
698
699
|
params = {
|
|
699
700
|
"limit": default_limit,
|
|
700
|
-
"offset":
|
|
701
|
+
"offset": offset,
|
|
701
702
|
}
|
|
702
703
|
if start is not None:
|
|
703
704
|
params["start"] = start.isoformat()
|
|
@@ -742,6 +743,7 @@ class Client(OAuth2Mixin, DelegationMixin, TokenStorageMixin, LocalCacheMixin):
|
|
|
742
743
|
sports: list[Sport | str] | None = None,
|
|
743
744
|
tags: list[str] | None = None,
|
|
744
745
|
limit: int = 100,
|
|
746
|
+
offset: int = 0,
|
|
745
747
|
as_dataframe: bool = False,
|
|
746
748
|
) -> list[ActivitySummary] | pd.DataFrame:
|
|
747
749
|
"""Gets a list of activities based on specified filters.
|
|
@@ -752,6 +754,7 @@ class Client(OAuth2Mixin, DelegationMixin, TokenStorageMixin, LocalCacheMixin):
|
|
|
752
754
|
sports: Optional list of sports to filter activities by. Can be Sport objects or string IDs.
|
|
753
755
|
tags: Optional list of tags to filter activities by.
|
|
754
756
|
limit: Maximum number of activities to return. Defaults to 100.
|
|
757
|
+
offset: Number of activities to skip. Defaults to 0.
|
|
755
758
|
as_dataframe: Whether to return results as a pandas DataFrame. Defaults to False.
|
|
756
759
|
|
|
757
760
|
Returns:
|
|
@@ -767,6 +770,7 @@ class Client(OAuth2Mixin, DelegationMixin, TokenStorageMixin, LocalCacheMixin):
|
|
|
767
770
|
sports=sports,
|
|
768
771
|
tags=tags,
|
|
769
772
|
limit=limit,
|
|
773
|
+
offset=offset,
|
|
770
774
|
))
|
|
771
775
|
if as_dataframe:
|
|
772
776
|
df = pd.DataFrame([activity.model_dump() for activity in activities])
|
|
@@ -1081,12 +1085,13 @@ class Client(OAuth2Mixin, DelegationMixin, TokenStorageMixin, LocalCacheMixin):
|
|
|
1081
1085
|
sports: list[Sport | str] | None = None,
|
|
1082
1086
|
tags: list[str] | None = None,
|
|
1083
1087
|
limit: int = 100,
|
|
1088
|
+
offset: int = 0,
|
|
1084
1089
|
) -> Generator[TraceDetails, None, None]:
|
|
1085
1090
|
num_returned = 0
|
|
1086
1091
|
default_limit = 100
|
|
1087
1092
|
params = {
|
|
1088
1093
|
"limit": default_limit,
|
|
1089
|
-
"offset":
|
|
1094
|
+
"offset": offset,
|
|
1090
1095
|
}
|
|
1091
1096
|
if start is not None:
|
|
1092
1097
|
params["start"] = start.isoformat()
|
|
@@ -1154,6 +1159,7 @@ class Client(OAuth2Mixin, DelegationMixin, TokenStorageMixin, LocalCacheMixin):
|
|
|
1154
1159
|
sports: list[Sport | str] | None = None,
|
|
1155
1160
|
tags: list[str] | None = None,
|
|
1156
1161
|
limit: int = 100,
|
|
1162
|
+
offset: int = 0,
|
|
1157
1163
|
as_dataframe: bool = False,
|
|
1158
1164
|
) -> list[TraceDetails] | pd.DataFrame:
|
|
1159
1165
|
"""Gets a list of traces based on specified filters.
|
|
@@ -1164,6 +1170,7 @@ class Client(OAuth2Mixin, DelegationMixin, TokenStorageMixin, LocalCacheMixin):
|
|
|
1164
1170
|
sports: Optional list of sports to filter traces by. Can be Sport objects or string IDs.
|
|
1165
1171
|
tags: Optional list of tags to filter traces by.
|
|
1166
1172
|
limit: Maximum number of traces to return. Defaults to 100.
|
|
1173
|
+
offset: Number of traces to skip. Defaults to 0.
|
|
1167
1174
|
as_dataframe: Whether to return results as a pandas DataFrame. Defaults to False.
|
|
1168
1175
|
|
|
1169
1176
|
Returns:
|
|
@@ -1179,6 +1186,7 @@ class Client(OAuth2Mixin, DelegationMixin, TokenStorageMixin, LocalCacheMixin):
|
|
|
1179
1186
|
sports=sports,
|
|
1180
1187
|
tags=tags,
|
|
1181
1188
|
limit=limit,
|
|
1189
|
+
offset=offset,
|
|
1182
1190
|
))
|
|
1183
1191
|
if not as_dataframe:
|
|
1184
1192
|
return traces
|
|
@@ -50,7 +50,7 @@ class StreamlitAuth:
|
|
|
50
50
|
self.api_key = st.session_state.get("sweatstack_api_key")
|
|
51
51
|
self.client = Client(self.api_key, streamlit_compatible=True)
|
|
52
52
|
|
|
53
|
-
def
|
|
53
|
+
def logout_button(self):
|
|
54
54
|
if st.button("Logout"):
|
|
55
55
|
self.api_key = None
|
|
56
56
|
self.client = Client(streamlit_compatible=True)
|
|
@@ -146,7 +146,7 @@ class StreamlitAuth:
|
|
|
146
146
|
"""
|
|
147
147
|
return self.api_key is not None
|
|
148
148
|
|
|
149
|
-
def authenticate(self, login_label: str | None = None):
|
|
149
|
+
def authenticate(self, login_label: str | None = None, show_logout: bool = True):
|
|
150
150
|
"""Authenticates the user with SweatStack.
|
|
151
151
|
|
|
152
152
|
This method handles the authentication flow for SweatStack in a Streamlit app.
|
|
@@ -168,7 +168,8 @@ class StreamlitAuth:
|
|
|
168
168
|
if not st.session_state.get("sweatstack_auth_toast_shown", False):
|
|
169
169
|
st.toast("SweatStack authentication successful!", icon="✅")
|
|
170
170
|
st.session_state["sweatstack_auth_toast_shown"] = True
|
|
171
|
-
|
|
171
|
+
if show_logout:
|
|
172
|
+
self.logout_button()
|
|
172
173
|
elif code := st.query_params.get("code"):
|
|
173
174
|
self._exchange_token(code)
|
|
174
175
|
st.query_params.clear()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sweatstack-0.49.0 → sweatstack-0.51.0}/playground/.ipynb_checkpoints/Untitled-checkpoint.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
{sweatstack-0.49.0 → sweatstack-0.51.0}/playground/Sweat Stack examples/Getting started.ipynb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sweatstack-0.49.0 → sweatstack-0.51.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
|