Metadata-Version: 2.4
Name: rd-mini
Version: 0.1.0
Summary: Zero-config AI observability. Two lines to get started.
Project-URL: Repository, https://github.com/ryandonofrio/rd-mini
Author-email: RD <rd@example.com>
License: MIT
Keywords: ai,anthropic,llm,observability,openai,tracing
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: httpx>=0.25.0
Provides-Extra: all
Requires-Dist: anthropic>=0.18.0; extra == 'all'
Requires-Dist: openai>=1.0.0; extra == 'all'
Provides-Extra: anthropic
Requires-Dist: anthropic>=0.18.0; extra == 'anthropic'
Provides-Extra: dev
Requires-Dist: anthropic>=0.18.0; extra == 'dev'
Requires-Dist: openai>=1.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest>=7.0.0; extra == 'dev'
Provides-Extra: openai
Requires-Dist: openai>=1.0.0; extra == 'openai'
Description-Content-Type: text/markdown

# Raindrop Python SDK

Zero-config AI observability. Two lines to get started.

## Installation

```bash
pip install raindrop-ai
```

## Quick Start

```python
from raindrop import Raindrop
from openai import OpenAI

# Initialize once
raindrop = Raindrop(api_key="your-api-key")

# Wrap your client
openai = raindrop.wrap(OpenAI())

# All calls are now automatically traced
response = openai.chat.completions.create(
    model="gpt-4",
    messages=[{"role": "user", "content": "Hello!"}]
)

# Access trace ID from response
print(response._trace_id)
```

## Features

### User Identification

```python
raindrop.identify("user-123", {"name": "John", "plan": "pro"})
```

### Multi-Step Interactions

```python
with raindrop.interaction(user_id="user-123", event="rag_query") as ctx:
    docs = search_docs(query)  # If wrapped with @raindrop.tool
    response = openai.chat.completions.create(...)
    # All steps are automatically linked
```

### Tool Tracing

```python
@raindrop.tool("search_docs")
def search_docs(query: str) -> list[dict]:
    return vector_db.search(query)
```

### Feedback

```python
raindrop.feedback(trace_id, {"score": 0.9, "comment": "Great response!"})
```

## Supported Providers

- OpenAI
- Anthropic

## Documentation

See [docs.raindrop.ai](https://docs.raindrop.ai) for full documentation.
