Skip to main content

Oura Ring API v2 client (generated from Oura's OpenAPI spec) — part of oura-toolkit

Project description

oura-toolkit (Python)

Python SDK for the Oura Ring API v2, part of oura-toolkit.

pip install oura-toolkit

One distribution, two submodules:

  • oura_toolkit.api — the data-plane client, generated from Oura's own OpenAPI spec (do not hand-edit — regenerated by just gen-py). Auth-agnostic: bring a Bearer token.
  • oura_toolkit.auth — hand-written OAuth companion: token store, refresh with rotation, spec-pinned OAuth metadata. It shares the oura CLI's on-disk token store (~/.config/oura-toolkit/ on Unix/macOS, %LOCALAPPDATA%\oura-toolkit\ on Windows) and its cross-process refresh protocol, so the CLI, its MCP server, and your Python code can all rotate the same tokens safely.

With a token you manage yourself:

from oura_toolkit.api import ApiClient, Configuration

config = Configuration(access_token="<your Oura access token>")
with ApiClient(config) as client:
    ...

Or let the companion keep the token fresh (run oura auth setup / oura auth login once — interactive OAuth deliberately lives in the CLI, never in this package):

from oura_toolkit.api import ApiClient
from oura_toolkit.auth import TokenManager

manager = TokenManager.load()  # reads the shared token store
with ApiClient(manager.configuration()) as client:
    ...  # every request carries a proactively refreshed Bearer token

On a 401, call manager.force_refresh() and retry the request once.

Oura uses OAuth2 with your own registered application (personal access tokens were deprecated in Dec 2025) — see the toolkit README for the registration walkthrough and the oura auth setup flow.

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

oura_toolkit-0.3.0.tar.gz (112.4 kB view details)

Uploaded Source

Built Distribution

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

oura_toolkit-0.3.0-py3-none-any.whl (407.7 kB view details)

Uploaded Python 3

File details

Details for the file oura_toolkit-0.3.0.tar.gz.

File metadata

  • Download URL: oura_toolkit-0.3.0.tar.gz
  • Upload date:
  • Size: 112.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for oura_toolkit-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5515d1fe9b5c870abf440dd73b135891be7c1f138d30b511706cf0decdad526d
MD5 cd9f5bb7e6241f17ceef5bd8891e6266
BLAKE2b-256 d4422fa690a22f11f9000fc9670d8f1aaa18ce2fea6960e69a552c852cc6d66f

See more details on using hashes here.

Provenance

The following attestation bundles were made for oura_toolkit-0.3.0.tar.gz:

Publisher: publish-sdks.yml on spxrogers/oura-toolkit

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

File details

Details for the file oura_toolkit-0.3.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for oura_toolkit-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 602bf29ef267bd8fd9df9c0346fb79a1a057a4484aaad301908d3f33531ab877
MD5 89a17d295b635ca3ea85e4741c715bd8
BLAKE2b-256 acb62e0046dfa304a90b50d317f784dced1bd37028ab37efba6fcdddad44b319

See more details on using hashes here.

Provenance

The following attestation bundles were made for oura_toolkit-0.3.0-py3-none-any.whl:

Publisher: publish-sdks.yml on spxrogers/oura-toolkit

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