Getting started¶
This getting started guide covers a quickstart and installation of the sweatstack
Python client library.
Quickstart¶
Use the sweatlab
command with uvx
to authenticate and launch a ready-to-use JupyterLab environment.
Run this in your terminal:
uvx --from "sweatstack[jupyter]" sweatlab
(please note that this requires uv to be installed)
Now you can for example get your latest activity data by creating a new Jupyter Notebook, pasting this code in the first cell and running it with Shift+Enter
:
import sweatstack as ss
# Get the latest activity data
data = ss.get_latest_activity_data()
Alternatively, you can install the library in your Python environment of choice and trigger the authentication flow yourself.
import sweatstack as ss
# Authenticate (opens browser)
ss.login()
# Get the latest activity data
data = ss.get_latest_activity_data()
...
Installation¶
sweatstack
is available on PyPI and can be installed using pip
.
uv
is recommended to manage Python and install the library.
Read more about uv
here.
Install SweatStack using uv:
uv pip install sweatstack
Or using pip:
python -m pip install sweatstack
Direct API Access¶
While the Python client library provides a convenient interface, you can also interact with the SweatStack API directly using standard HTTP requests. The API follows REST principles and uses JSON for most endpoints.
The interactive API documentation is available at app.sweatstack.no/docs, where you can:
- Browse all available endpoints
- Try out API calls directly in the browser
- View request/response examples
- See detailed schema definitions
- Test authentication