Metadata-Version: 2.4
Name: apirelio
Version: 0.2.0
Summary: Fail-safe asynchronous ingestion core for Apirelio Python SDKs.
Author: Apirelio
License-Expression: MIT
Project-URL: Homepage, https://apirelio.com/docs
Project-URL: Repository, https://github.com/pryznar/apirelio-python-core
Project-URL: Issues, https://github.com/pryznar/apirelio-python-core/issues
Keywords: apirelio,api,analytics,observability,telemetry
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: build>=1.2; extra == "dev"
Requires-Dist: mypy>=1.10; extra == "dev"
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: ruff>=0.6; extra == "dev"
Dynamic: license-file

# Apirelio Python Core

Dependency-free, fail-safe asynchronous delivery core shared by official Apirelio Python SDKs.
It creates the same customer-aware event contract as the PHP and TypeScript SDKs without capturing
bodies, credentials, cookies, query strings, email addresses or IP addresses.

```bash
pip install apirelio
```

Framework applications should normally install their adapter. Custom integrations can enqueue
completed requests directly:

```python
from apirelio import ApirelioClient

client = ApirelioClient(
    api_key="apr_project_key",
    service="billing-api",
    environment="production",
    metadata_keys=("region",),
)

client.capture({
    "method": "GET",
    "route": "/api/invoices/{invoice_id}",
    "status": 200,
    "duration_ms": 24,
    "sdk": "custom-python",
    "sdk_version": "1.0.0",
    "customer": {"id": "customer_42", "plan": "growth"},
})
```

`capture()` only builds and enqueues an event. A daemon worker sends bounded batches in the
background. Network and callback failures never alter the observed API response. Call
`client.shutdown()` during graceful shutdown to flush pending events.

Python 3.9 and newer are supported. The core has no runtime dependencies.

