Skip to main content

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

Project description

Raindrop Python SDK

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

Installation

pip install raindrop-ai

Quick Start

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

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

Multi-Step Interactions

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

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

Feedback

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

Supported Providers

  • OpenAI
  • Anthropic

Documentation

See docs.raindrop.ai for full documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rd_mini-0.1.0.tar.gz (50.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rd_mini-0.1.0-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file rd_mini-0.1.0.tar.gz.

File metadata

  • Download URL: rd_mini-0.1.0.tar.gz
  • Upload date:
  • Size: 50.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for rd_mini-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e31e01677a804060493ea23aedfed19598f339bf8379ecdcd475131311c885a9
MD5 24b9c36f3c1bf56f45154240d4a1e08d
BLAKE2b-256 9523f85b63b2611c5055dda099033faf7169f982171d927e3088b270aa82c117

See more details on using hashes here.

File details

Details for the file rd_mini-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rd_mini-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for rd_mini-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f4aaa3d3f5966f878bba523ebb4d38031215281b830767c5a7f10f5966c52646
MD5 52026c201d2f1211502ce677d469d65a
BLAKE2b-256 d70247459f5c3e745cf568703a070dd7cfb0056d00c36ef2f34cdc77cae63afc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page