Metadata-Version: 2.4
Name: reliably-sdk
Version: 0.1.0
Summary: Real-time third-party API reliability benchmarks from production traffic
Project-URL: Homepage, https://reliably.sh
Project-URL: Repository, https://github.com/ZurabWeb/reliably
Project-URL: Documentation, https://reliably.sh/setup
License-Expression: MIT
Keywords: api,benchmarks,latency,monitoring,observability,reliability
Classifier: Development Status :: 3 - Alpha
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: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# reliably

Real-time third-party API reliability benchmarks from production traffic — not status pages.

## Install

```bash
pip install reliably
```

## Quick Start

```python
from reliably import reliably

# Wrap any API client — zero config, no signup required
stripe = reliably.wrap(stripe.StripeClient(os.environ["STRIPE_KEY"]))
openai_client = reliably.wrap(OpenAI(api_key=os.environ["OPENAI_KEY"]))

# Use them exactly as before
charge = stripe.charges.create(amount=2000, currency="usd")
completion = openai_client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello"}]
)
```

## With Project ID

```python
from reliably import Reliably

r = Reliably(project_id="proj_xxx")
stripe = r.wrap(stripe_client)
```

## What Gets Tracked

- Provider name (e.g., "stripe", "openai")
- Endpoint (e.g., "charges.create")
- Status code
- Latency (ms)
- Error classification

**Never tracked:** request/response bodies, API keys, URLs, headers, or any PII.

## Configuration

```python
from reliably import Reliably

r = Reliably(
    project_id="proj_xxx",       # Optional
    endpoint="https://...",      # Custom ingest (self-hosted)
    flush_interval=30.0,         # Seconds between flushes
    max_batch_size=100,          # Max events before flush
    enabled=True,                # Disable in tests
    debug=False,                 # Print events to console
)
```

## Design Principles

- Zero dependencies (stdlib only)
- Never crashes your app
- Async telemetry (background thread)
- Fire and forget — if ingest is down, your app doesn't notice

## License

MIT
