# Python SDK (ingest)

> Quickly integrate the Ours Privacy Python SDK using pip. Send test requests from the Track Events API reference.

Source: https://docs.oursprivacy.com/docs/python

Use this page to install the Ours Privacy Python SDK and send events from your server. Every request takes your Ingest API source's API key as `token`. Copy it from the **API Keys** card on the source's **Settings** tab.

## Installation

Install the SDK via pip:

```bash
pip install oursprivacy-client
```

For more details, visit the [PyPi repository](https://pypi.org/project/oursprivacy-client) | [Github Repo](https://github.com/with-ours/ingest-sdk-python).

## Usage

Create a client and track an event:

```python
from ours_privacy import OursPrivacy

client = OursPrivacy()

# Track an event
response = client.track.event(
    token="your-source-token",
    event="Purchase",
)

print(response.success)
```

## Next Steps

- [Ingest API Integration](https://docs.oursprivacy.com/docs/server-to-server-integration): match events to visitors, backfill past events, and test with a Test Mode key.
- [Track Events API reference](https://docs.oursprivacy.com/docs/reference/track) and [Identify Visitors API reference](https://docs.oursprivacy.com/docs/reference/identify): every field the SDK accepts.
- [Python SDK on GitHub](https://github.com/with-ours/ingest-sdk-python): retries, timeouts, and error handling.
