# Python

Use the Kirora HTTP API from Python while the official client is planned.

The official Python client is planned and has no announced release date. Until it is available, use the HTTP API with the example below. The package name will be confirmed when the client is released.

## What it will cover

The Python client will follow the [SDK conformance](/docs/api/sdk-conformance) checklist and copy the shape of the [Node.js reference library](/docs/sdks/node): one namespace per API tag and one method per `operationId` in `snake_case` (`client.contacts.identify()`, `client.events.track()`), a single error type carrying the API's `code`, bounded retries with jitter on 429 and 5xx, auto-paginating iterators, caller-supplied idempotency keys, and a constant-time webhook verifier.

## Use the HTTP API today

Call the API directly with your key as a bearer token. [`trackEvent`](/docs/api/reference/trackEvent) requires an `Idempotency-Key`; derive it from your own order or event id so a retry is recorded once. To track an event with `requests`:

```python
import os
import requests

response = requests.post(
    "https://api.kirora.io/v1/events/track",
    headers={
        "Authorization": f"Bearer {os.environ['KIRORA_API_KEY']}",
        "Idempotency-Key": "order-1042-completed",
    },
    json={
        "externalId": "cust_1042",
        "eventName": "Order Completed",
        "properties": {"orderId": "1042", "total": 42.5, "currency": "USD"},
    },
    timeout=30,
)
response.raise_for_status()
print(response.json()["data"]["id"])
```

See [Errors](/docs/api/errors) and [Idempotency](/docs/api/idempotency) before adding retries.