# Get started

Canonical page: https://docs.ovok.com/python-sdk/getting-started

The Python SDK requires Python 3.10 or later and has no runtime dependencies outside
the standard library.

## Install [#install]

Install the SDK from PyPI:

```bash
pip install ovok-sdk
```

Or with uv:

```bash
uv add ovok-sdk
```

`pip install ovok-sdk` installs final releases only. Release candidates (`0.1.0rc<n>`) and
development builds (`0.1.0.dev<N>`) are pre-releases on PyPI:

```bash
pip install --pre ovok-sdk
pip install "ovok-sdk==0.1.0.dev<N>"
```

## Create a client [#create-a-client]

```python
from ovok_sdk import Ovok

ovok = Ovok("https://api.sandbox.ovok.com", "your-tenant")
```

Each namespace on the client, such as `ovok.fhir` or `ovok.slim`, mirrors one area of the
Ovok API; the [overview](/python-sdk#namespaces) lists them. A bad option raises
`OvokConfigError` here, not on the first request.

## Sign in [#sign-in]

For a user, start a session with `ovok.auth.login`:

```python
result = ovok.auth.login(profile_type="Patient", email=email, password=password)
```

For a backend service, pass `client_id` and `client_secret` instead; see
[Authenticate a machine client](/python-sdk/guides/machine-clients).

## Read API data [#read-api-data]

```python
patients = ovok.slim.patients.list({"count": 20})
patient = ovok.slim.patients.retrieve("patient-id")
accounts = ovok.accounts.list()
```

Paged list methods return a `Page`; see [Page through lists](/python-sdk/guides/paging).

## Next steps [#next-steps]

- Read the guide for each namespace you use, starting from the [overview](/python-sdk).
- [Handle errors](/python-sdk/guides/handle-errors) by catching the `OvokError` subclasses.
- Look up exact signatures in the [API reference](/python-sdk/reference).
