Skip to main content

SweatStack Python SDK

The official Python client for SweatStack, the sports data platform: one API for activities, time series, lab tests and daily measures from every wearable.

Install

uv add "sweatstack[polars]"     # analysis with Polars
uv add "sweatstack[pandas]"     # analysis with pandas
uv add sweatstack               # models only: FastAPI services, webhook consumers

Other extras: [arrow] (DuckDB), [streamlit] and [fastapi] (sign-in helpers). Extras combine: sweatstack[polars,arrow].

Quickstart

from sweatstack import Client

client = Client()
client.authenticate()  # opens the browser once; the sign-in is saved for later runs

latest = client.activities.latest()
if latest is None:
    raise SystemExit("No activities yet: connect a wearable at https://app.sweatstack.no")
print(latest.sport, latest.start_local)

data = client.activities.data(latest.id, metrics=["power", "heart_rate"])
print(data.head())

Every endpoint group is an attribute named after its URL: /api/v1/activities/... is client.activities, /api/v1/tests/... is client.tests. Collections take output= ("polars", "pandas", "arrow") for a frame instead of models.

In a script or notebook, the module-level functions use one shared client: sweatstack.activities.list(). In an app that serves several users, use one Client per user, such as the ones the FastAPI and Streamlit helpers give you.

For coding agents

Install the SDK's agent skill for Claude Code, Cursor, Codex and other agents:

npx skills add SweatStack/sweatstack-python

Documentation

Sports follow OpenSportTaxonomy: sweatstack.Sport is its Sport type.

Metadata

Release files for sweatstack 0.100.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sweatstack 0.100.0
File Size Uploaded Provenance Actions
sweatstack-0.100.0.tar.gz 460.9 kB Without provenance Details for sweatstack-0.100.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sweatstack 0.100.0
File Interpreter ABI Platform Actions
sweatstack-0.100.0-py3-none-any.whl Python 3 none any Details for sweatstack-0.100.0-py3-none-any.whl

Total release size: 573.2 kB

Release files / sweatstack-0.100.0.tar.gz

Download URL sweatstack-0.100.0.tar.gz
Size 460.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ef8195973a21fbd6f4c44ef74cdf1e032a696e037d52e9869e9eaf604fcaa914
BLAKE2b-256 checksum
How to use checksums
f0f17e0b374cda2e1f72c77d6c4f1f778568fd0221d593e219761c93e8cba739
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.10

Release files / sweatstack-0.100.0-py3-none-any.whl

Download URL sweatstack-0.100.0-py3-none-any.whl
Size 112.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
25401e7dabe977dd2cff0bd70362b1c578e7681c75af7b9e3f439ee2180798f4
BLAKE2b-256 checksum
How to use checksums
319190cb944d0bac31de5322c8c8d9467ea79a3d670e19fd987a1e4622d39ae3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.10

Security for sweatstack 0.100.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.100.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page