Metadata-Version: 2.5
Name: relia-sdk
Version: 0.1.2
Summary: Observability, APM tracing, and AI agent monitoring for Python — one SDK, zero config.
Author-email: RELIA Team <support@tryrelia.com>
License: MIT
Keywords: ai-agents,apm,fastapi,llm-monitoring,observability,opentelemetry,relia,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 :: System :: Monitoring
Requires-Python: >=3.9
Requires-Dist: httpx>=0.24.0
Provides-Extra: agent
Requires-Dist: httpx>=0.24.0; extra == 'agent'
Provides-Extra: all
Requires-Dist: django>=4.0; extra == 'all'
Requires-Dist: fastapi>=0.100.0; extra == 'all'
Requires-Dist: flask>=2.0.0; extra == 'all'
Requires-Dist: httpx>=0.24.0; extra == 'all'
Requires-Dist: opentelemetry-api>=1.20.0; extra == 'all'
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.20.0; extra == 'all'
Requires-Dist: opentelemetry-instrumentation-django>=0.40b0; extra == 'all'
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.40b0; extra == 'all'
Requires-Dist: opentelemetry-instrumentation-flask>=0.40b0; extra == 'all'
Requires-Dist: opentelemetry-instrumentation-httpx>=0.40b0; extra == 'all'
Requires-Dist: opentelemetry-instrumentation-requests>=0.40b0; extra == 'all'
Requires-Dist: opentelemetry-sdk>=1.20.0; extra == 'all'
Provides-Extra: dev
Requires-Dist: fastapi>=0.100.0; extra == 'dev'
Requires-Dist: httpx>=0.24.0; extra == 'dev'
Requires-Dist: opentelemetry-api>=1.20.0; extra == 'dev'
Requires-Dist: opentelemetry-sdk>=1.20.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
Requires-Dist: pytest-mock>=3.12.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Provides-Extra: django
Requires-Dist: django>=4.0; extra == 'django'
Requires-Dist: opentelemetry-api>=1.20.0; extra == 'django'
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.20.0; extra == 'django'
Requires-Dist: opentelemetry-instrumentation-django>=0.40b0; extra == 'django'
Requires-Dist: opentelemetry-instrumentation-httpx>=0.40b0; extra == 'django'
Requires-Dist: opentelemetry-instrumentation-requests>=0.40b0; extra == 'django'
Requires-Dist: opentelemetry-sdk>=1.20.0; extra == 'django'
Provides-Extra: fastapi
Requires-Dist: fastapi>=0.100.0; extra == 'fastapi'
Requires-Dist: opentelemetry-api>=1.20.0; extra == 'fastapi'
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.20.0; extra == 'fastapi'
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.40b0; extra == 'fastapi'
Requires-Dist: opentelemetry-instrumentation-httpx>=0.40b0; extra == 'fastapi'
Requires-Dist: opentelemetry-instrumentation-requests>=0.40b0; extra == 'fastapi'
Requires-Dist: opentelemetry-sdk>=1.20.0; extra == 'fastapi'
Provides-Extra: flask
Requires-Dist: flask>=2.0.0; extra == 'flask'
Requires-Dist: opentelemetry-api>=1.20.0; extra == 'flask'
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.20.0; extra == 'flask'
Requires-Dist: opentelemetry-instrumentation-flask>=0.40b0; extra == 'flask'
Requires-Dist: opentelemetry-instrumentation-httpx>=0.40b0; extra == 'flask'
Requires-Dist: opentelemetry-instrumentation-requests>=0.40b0; extra == 'flask'
Requires-Dist: opentelemetry-sdk>=1.20.0; extra == 'flask'
Provides-Extra: otel
Requires-Dist: opentelemetry-api>=1.20.0; extra == 'otel'
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.20.0; extra == 'otel'
Requires-Dist: opentelemetry-instrumentation-httpx>=0.40b0; extra == 'otel'
Requires-Dist: opentelemetry-instrumentation-requests>=0.40b0; extra == 'otel'
Requires-Dist: opentelemetry-sdk>=1.20.0; extra == 'otel'
Description-Content-Type: text/markdown

# RELIA Python SDK

Unified observability and AI agent monitoring for Python. One SDK for APM tracing, LLM cost tracking, and agent workflow monitoring — with zero-config auto-instrumentation.

## Install

```bash
pip install relia-sdk
```

## Setup

```bash
python -m relia init
```

The interactive wizard detects your framework, creates a project, and generates all config files automatically.

## Features

- **Zero-code LLM interception** — patches `httpx` and `requests` to capture all API calls automatically
- **Smart conversation tracking** — groups multi-turn and tool-calling chains into single runs
- **Cost estimation** — built-in pricing for 24+ models (GPT-4o, Claude, Gemini, DeepSeek, etc.)
- **Sensitive data redaction** — auto-redacts passwords, tokens, API keys, credit cards before export
- **Non-blocking reporting** — background thread pool, never slows your app
- **SSE streaming support** — captures tool calls and usage from streaming completions
- **Cloudflare/Vercel geo enrichment** — extracts client IP, country, city from proxy headers

## CLI Commands

```bash
python -m relia init      # Interactive project setup
python -m relia whoami    # Show current user
python -m relia logout    # Remove credentials
```

## Environment Variables

| Variable | Description |
|---|---|
| `RELIA_PROJECT_ID` | Your RELIA project ID |
| `RELIA_SERVICE_NAME` | Service name for APM (default: `backend`) |
| `RELIA_OTLP_ENDPOINT` | Custom OTLP collector URL |
| `RELIA_AGENT_ENDPOINT` | Agent run ingestion URL |
| `RELIA_ENV` | Environment label (default: `production`) |

The SDK also reads from `.env` / `.env.local` files automatically.

## Links

- [GitHub](https://github.com/tryrelia)
- [PyPI](https://pypi.org/project/relia-sdk/)

## Support

- Email: tryrelia1@gmail.com
- Issues: https://github.com/tryrelia/relia-python/issues

## License

MIT
