ovok_sdk.ovok
The `Ovok` client, the entry point to every API namespace.
- Stable unknown
- Release candidate since 0.1.0-rc.4
- Development since 0.1.0-dev.25+2ba84b0
The Ovok client, the entry point to every API namespace.
Ovok
Ovok(
base_url: str,
tenant_code: str,
*,
fhir_path: str = DEFAULT_FHIR_PATH,
storage: OvokStorage | None = None,
client_id: str | None = None,
client_secret: str | None = None,
transport: Transport | None = None,
timeout: float = DEFAULT_TIMEOUT_SECONDS,
max_network_retries: int = DEFAULT_MAX_NETWORK_RETRIES,
on_unauthenticated: OnUnauthenticated | None = None,
)One client per tenant; each namespace mirrors an area of the Ovok API.
Without client_secret the client acts for a signed-in user (see auth); with
client_id and client_secret it authenticates as a machine client.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
base_url | str | Absolute http(s) URL of the Ovok API, such as https://api.sandbox.ovok.com. | |
tenant_code | str | Tenant every request is scoped to. | |
fhir_path | str | DEFAULT_FHIR_PATH | Path of the FHIR API under base_url. |
storage | OvokStorage | None | None | Where the user session is kept; defaults to MemoryStorage. |
client_id | str | None | None | App client ID, used for social sign-in, password resets and machine auth. |
client_secret | str | None | None | Machine client secret; requires client_id. |
transport | Transport | None | None | Sends HTTP requests; defaults to UrllibTransport. |
timeout | float | DEFAULT_TIMEOUT_SECONDS | Request timeout in seconds. |
max_network_retries | int | DEFAULT_MAX_NETWORK_RETRIES | Retries for safe requests that fail on the network. |
on_unauthenticated | OnUnauthenticated | None | None | Called with an UnauthenticatedReason when the user is signed out. |
Raises
OvokConfigError: An option is missing or invalid.
Examples
>>> from ovok_sdk import Ovok
>>> ovok = Ovok("https://api.sandbox.ovok.com", "your-tenant")
>>> page = ovok.slim.patients.list({"count": 20})Last updated on