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.2.2.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.2.2-py3-none-any.whl (407.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: oura_toolkit-0.2.2.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.2.2.tar.gz
Algorithm Hash digest
SHA256 799e01f03e586804e89f7d1c8055205bd35974fb0e2055eb3d9112746d11b1ed
MD5 c9d133332250d5efda87ec7c75398bc9
BLAKE2b-256 df908ceb1878a5b2f7e9fddf3c8275f89f6f703d221992352121f286ae19d625

See more details on using hashes here.

Provenance

The following attestation bundles were made for oura_toolkit-0.2.2.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.2.2-py3-none-any.whl.

File metadata

  • Download URL: oura_toolkit-0.2.2-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.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7c7bdc432f83c46fa33d2389204263c53af4b6045c9e5a5c15e3c6bd9bef36c1
MD5 9553691cf6b1b465e9b7fa6d9bd128e4
BLAKE2b-256 6f9c5473aed36f28ffbd3e156f9b74ce58e3c2f49b7d0c1031ffa7a7125fce7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for oura_toolkit-0.2.2-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