Skip to main content

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.

Metadata

Release files for oura-toolkit 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oura-toolkit 0.4.0
File Size Uploaded
oura_toolkit-0.4.0.tar.gz 112.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for oura-toolkit 0.4.0
File Interpreter ABI Platform
oura_toolkit-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 520.4 kB

Release files / oura_toolkit-0.4.0.tar.gz

Download URL oura_toolkit-0.4.0.tar.gz
Size 112.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4cd08aa703807699b31108b94369287da7d95b46857746e4361d972dba06618a
BLAKE2b-256 checksum
How to use checksums
13ec886d74718b4ac60cc972a73156115187c6d087829ad6ea9563810971b66f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release files / oura_toolkit-0.4.0-py3-none-any.whl

Download URL oura_toolkit-0.4.0-py3-none-any.whl
Size 407.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b30e4e8920995f4c2f142c3ef6a4772a1380fc00c7908c0ce92ba0a6839d32a7
BLAKE2b-256 checksum
How to use checksums
4946726b14515e3d6b2c167cc4153f82170073778f4fe5b304e2fa01e1d02fec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page