> ## Documentation Index
> Fetch the complete documentation index at: https://docs.brello.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Python quickstart

> Wrap your OpenAI, Anthropic, or Google Gen AI Python client and send your first usage event.

Use Python 3.10 or newer and a Brello [project ingestion key](https://docs.brello.app/sdk/guides/authentication.md). Configure your provider credentials separately.

## Install the SDK

From the root of the Python SDK checkout, install `brello-sdk` into your application's environment. The package imports as `brello`.

```bash theme={null}
python -m pip install .
```

Keep your application's `openai`, `anthropic`, or `google-genai` dependency. Set your project key on the server:

```bash theme={null}
export BRELLO_API_KEY="YOUR_BRELLO_PROJECT_KEY"
```

The SDK sends events to `https://api.brello.app/v1` by default. If you run Brello yourself, [set your self-hosted API URL](https://docs.brello.app/sdk/python/configuration.md#connect-to-self-hosted-brello).

## Wrap your client

```python OpenAI theme={null}
from brello import Brello
from openai import OpenAI

brello = Brello()
client = brello.wrap(OpenAI())
```

```python Anthropic theme={null}
from anthropic import Anthropic
from brello import Brello

brello = Brello()
client = brello.wrap(Anthropic())
```

```python Google AI Studio theme={null}
import os

from brello import Brello
from google import genai

brello = Brello()
client = brello.wrap(
    genai.Client(api_key=os.environ["GEMINI_API_KEY"]),
    provider="google_ai_studio",
)
```

```python Vertex AI theme={null}
import os

from brello import Brello
from google import genai

brello = Brello()
client = brello.wrap(
    genai.Client(
        vertexai=True,
        project=os.environ["GOOGLE_CLOUD_PROJECT"],
        location=os.environ["GOOGLE_CLOUD_LOCATION"],
    ),
    provider="google_vertex_ai",
)
```

Reuse one `Brello` instance per process. For async code, wrap `AsyncOpenAI()` or `AsyncAnthropic()`, or use `client.aio` on a wrapped Google client. See the [Google guide](https://docs.brello.app/sdk/python/google.md) for credentials and request examples.

## Verify the connection

Make a provider call with the wrapped client, or finish consuming a stream. If your test script exits immediately afterward, call `brello.flush()` from sync code or `await brello.aflush()` from async code.

In Brello, open your project's **Settings** and look for **Connected** under SDK activity. The status appears after the worker stores an event.

See the [OpenAI guide](https://docs.brello.app/sdk/python/openai.md), [Anthropic guide](https://docs.brello.app/sdk/python/anthropic.md), [Google guide](https://docs.brello.app/sdk/python/google.md), or [configuration and delivery](https://docs.brello.app/sdk/python/configuration.md) for examples.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.