Metadata-Version: 2.4
Name: prism-llm-labs
Version: 0.1.0
Summary: LLM cost and usage observability SDK
Requires-Python: >=3.9
Requires-Dist: httpx>=0.25.0
Requires-Dist: openai>=1.0.0
Requires-Dist: pydantic>=2.0
Provides-Extra: dev
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-asyncio; extra == 'dev'
Requires-Dist: respx; extra == 'dev'
Description-Content-Type: text/markdown

# prism-llm

LLM cost and usage observability SDK. Drop-in replacement for the OpenAI client.

## Install

```bash
pip install prism-llm
```

## Usage

```python
from prism import OpenAI

client = OpenAI(
    api_key="sk-...",          # your OpenAI key
    prism_key="prism_live_...", # your Prism API key
    project="my-project",
    environment="production",
)

# Use exactly like openai.OpenAI
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello"}],
)
```

## Configuration

| Env var | Description |
|---------|-------------|
| `PRISM_API_KEY` | Your Prism API key (Tinybird ingest token) |
| `PRISM_PROJECT` | Project name for attribution |
| `PRISM_TEAM` | Team identifier |
| `PRISM_ENVIRONMENT` | `production` / `staging` / `development` |
| `PRISM_TINYBIRD_INGEST_URL` | Override Tinybird ingest URL (for non-EU regions) |
