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 byjust 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 theouraCLI'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
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 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
799e01f03e586804e89f7d1c8055205bd35974fb0e2055eb3d9112746d11b1ed
|
|
| MD5 |
c9d133332250d5efda87ec7c75398bc9
|
|
| BLAKE2b-256 |
df908ceb1878a5b2f7e9fddf3c8275f89f6f703d221992352121f286ae19d625
|
Provenance
The following attestation bundles were made for oura_toolkit-0.2.2.tar.gz:
Publisher:
publish-sdks.yml on spxrogers/oura-toolkit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oura_toolkit-0.2.2.tar.gz -
Subject digest:
799e01f03e586804e89f7d1c8055205bd35974fb0e2055eb3d9112746d11b1ed - Sigstore transparency entry: 2178467473
- Sigstore integration time:
-
Permalink:
spxrogers/oura-toolkit@3729f4282dadea9a940df5423e84d2efeb16a173 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/spxrogers
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdks.yml@3729f4282dadea9a940df5423e84d2efeb16a173 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c7bdc432f83c46fa33d2389204263c53af4b6045c9e5a5c15e3c6bd9bef36c1
|
|
| MD5 |
9553691cf6b1b465e9b7fa6d9bd128e4
|
|
| BLAKE2b-256 |
6f9c5473aed36f28ffbd3e156f9b74ce58e3c2f49b7d0c1031ffa7a7125fce7c
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oura_toolkit-0.2.2-py3-none-any.whl -
Subject digest:
7c7bdc432f83c46fa33d2389204263c53af4b6045c9e5a5c15e3c6bd9bef36c1 - Sigstore transparency entry: 2178467505
- Sigstore integration time:
-
Permalink:
spxrogers/oura-toolkit@3729f4282dadea9a940df5423e84d2efeb16a173 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/spxrogers
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-sdks.yml@3729f4282dadea9a940df5423e84d2efeb16a173 -
Trigger Event:
workflow_dispatch
-
Statement type: