Official Python SDK for the Saturday Nutrition Intelligence API
Project description
Saturday Python SDK
Official Python SDK for the Saturday Nutrition Intelligence API.
Personalized fuel, hydration, and electrolyte prescriptions for endurance athletes.
Install
pip install saturday
Quick Start
from saturday import Saturday
client = Saturday(api_key="sat_live_...")
# Calculate a nutrition prescription
prescription = client.nutrition.calculate(
activity_type="bike",
duration_min=180,
athlete_weight_kg=75,
thermal_stress_level=7,
is_race=True,
)
# Safety metadata is ALWAYS included — athlete safety is never paywalled
print(prescription["safety"]["warnings"])
print(f"Carbs: {prescription['carbohydrate']['target_g_per_hr']} g/hr")
print(f"Sodium: {prescription['sodium']['target_mg_per_hr']} mg/hr")
print(f"Fluid: {prescription['fluid']['target_ml_per_hr']} mL/hr")
Features
- Fully typed with
py.typedmarker (PEP 561) - Automatic retry with exponential backoff (429s and 5xx)
- Typed errors (
AuthenticationError,RateLimitError,ValidationError,NotFoundError) - API key and OAuth2 Bearer token authentication
- Context manager support for clean connection handling
- Safety types prominently surfaced (
not_instructionsdocumented)
Authentication
# API key (server-to-server)
client = Saturday(api_key="sat_live_...")
# OAuth2 Bearer token (athlete-delegated access)
client = Saturday(api_key="sat_live_...", bearer_token="eyJ...")
# Context manager for automatic cleanup
with Saturday(api_key="sat_live_...") as client:
rx = client.nutrition.calculate(activity_type="run", duration_min=60)
Error Handling
from saturday import Saturday, RateLimitError, ValidationError, NotFoundError
client = Saturday(api_key="sat_live_...")
try:
rx = client.nutrition.calculate(activity_type="swim", duration_min=60)
except ValidationError as e:
print(f"Invalid request: {e} (param: {e.param})")
except RateLimitError as e:
print(f"Rate limited. Retry after {e.retry_after}s")
except NotFoundError:
print("Resource not found")
Resources
| Resource | Description |
|---|---|
client.nutrition |
Calculate prescriptions, batch, compare |
client.athletes |
Athlete CRUD, settings, batch create, GDPR export |
client.activities |
Activity CRUD, prescription calculation, feedback |
client.products |
Product search, barcode lookup, curated list |
client.ai |
AI coaching conversations |
client.webhooks |
Webhook registration and management |
client.organizations |
Team/org management with members |
client.gear |
Athlete gear inventory |
client.knowledge |
Sports nutrition knowledge base search |
Documentation
Full API documentation: docs.saturday.fit
Requirements
- Python 3.9+
- httpx 0.25+
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file saturday-0.1.0.tar.gz.
File metadata
- Download URL: saturday-0.1.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d8e8b184ffc48c9ceb0784db774ab872d44c262ba813de6701b00d78767f6fa
|
|
| MD5 |
e5c6b9c529c054202b61e2172c65b31d
|
|
| BLAKE2b-256 |
9e944acf1b2cbed91d28dea3a7e12b02ab7406c91e7237a0bdad1c874bf4e4fd
|
Provenance
The following attestation bundles were made for saturday-0.1.0.tar.gz:
Publisher:
publish.yml on SaturdayInc/saturday-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
saturday-0.1.0.tar.gz -
Subject digest:
9d8e8b184ffc48c9ceb0784db774ab872d44c262ba813de6701b00d78767f6fa - Sigstore transparency entry: 1280189753
- Sigstore integration time:
-
Permalink:
SaturdayInc/saturday-python@d1b514033284610af52adc315249c88fd20719ca -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/SaturdayInc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d1b514033284610af52adc315249c88fd20719ca -
Trigger Event:
release
-
Statement type:
File details
Details for the file saturday-0.1.0-py3-none-any.whl.
File metadata
- Download URL: saturday-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6554c57117b648dfcd0d4847a62d292ba13da562251c93114d6a25a9ba42392
|
|
| MD5 |
b4077645ac2cbfe33e68d1a13ecc81b2
|
|
| BLAKE2b-256 |
c8a4e09f74abaf7a2a8e0c767b9e066f9f9eeb13b3e538fdf2d2b1954c133e6b
|
Provenance
The following attestation bundles were made for saturday-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on SaturdayInc/saturday-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
saturday-0.1.0-py3-none-any.whl -
Subject digest:
c6554c57117b648dfcd0d4847a62d292ba13da562251c93114d6a25a9ba42392 - Sigstore transparency entry: 1280189755
- Sigstore integration time:
-
Permalink:
SaturdayInc/saturday-python@d1b514033284610af52adc315249c88fd20719ca -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/SaturdayInc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d1b514033284610af52adc315249c88fd20719ca -
Trigger Event:
release
-
Statement type: