Metadata-Version: 2.4
Name: spendlens
Version: 0.1.0
Summary: LLM cost attribution — track OpenAI spend by user, feature, and endpoint
Home-page: https://github.com/ChrisRobinT/spendlens.dev-product
Author: Chris Robin
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: openai>=1.0.0
Dynamic: author
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# SpendLens

Track your OpenAI costs by user, feature, and endpoint. Two-line integration.

## Install

```
pip install spendlens
```

## Usage

```python
from spendlens import SpendLensClient

client = SpendLensClient(api_key="your-spendlens-api-key")

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello"}],
    tags={"user_id": "u_123", "feature": "chat", "endpoint": "/api/chat"},
)
```

Your costs appear on the dashboard. That's it.

- Never logs prompts or completions. Only metadata.
- Never modifies the OpenAI response.
- Never adds latency. Logging is async.
