Skip to main content

Official Python SDK for the Saturday Nutrition Intelligence API

Project description

Saturday Python SDK

PyPI License: MIT

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="sk_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['carb_g_per_hr']} g/hr")
print(f"Sodium: {prescription['sodium_mg_per_hr']} mg/hr")
print(f"Fluid: {prescription['fluid_ml_per_hr']} mL/hr")

Features

  • Fully typed with py.typed marker (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_instructions documented)

Authentication

# API key (server-to-server)
client = Saturday(api_key="sk_live_...")

# OAuth2 Bearer token (athlete-delegated access)
client = Saturday(api_key="sk_live_...", bearer_token="eyJ...")

# Context manager for automatic cleanup
with Saturday(api_key="sk_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="sk_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

saturday-0.1.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

saturday-0.1.1-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file saturday-0.1.1.tar.gz.

File metadata

  • Download URL: saturday-0.1.1.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

Hashes for saturday-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d82d8f3c75a342c6d9d3df6d9e621e2f831dc0275b4af812eb24db7c332ead94
MD5 b344075d24bb3b52ca553c4217424992
BLAKE2b-256 5a76e965152d73c9155f40bc7462bbf21eb06b1d19e24ac9b5522b54af835aa7

See more details on using hashes here.

Provenance

The following attestation bundles were made for saturday-0.1.1.tar.gz:

Publisher: publish.yml on SaturdayInc/saturday-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file saturday-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: saturday-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for saturday-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c6f915e7b0abd1cf1c0a1617957eeb98ce757e5f1bc98153d7444d922b795fe1
MD5 17a151baa4900ce829c7d0c14659cb09
BLAKE2b-256 eaaa08f05c7dbdc550a68b51772655730ffe3b599fec076c77a393bc6f35b589

See more details on using hashes here.

Provenance

The following attestation bundles were made for saturday-0.1.1-py3-none-any.whl:

Publisher: publish.yml on SaturdayInc/saturday-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page