Apirelio FastAPI SDK
Documentation · PyPI · Apirelio
Connect FastAPI errors, latency and releases to the affected customers without capturing request or response payloads.
Native FastAPI/Starlette ASGI middleware for privacy-safe, customer-aware API analytics. It uses the resolved route template and only enqueues after the response completes.
pip install apirelio-fastapi
import os
from fastapi import FastAPI
from apirelio_fastapi import install_apirelio
app = FastAPI()
install_apirelio(
app,
api_key=os.environ.get("APIRELIO_API_KEY", ""),
endpoint=os.environ.get("APIRELIO_ENDPOINT", "https://apirelio.com"),
service="billing-api",
environment="production",
include_routes=("/api/**",),
exclude_routes=("/api/health", "/api/internal/**"),
resolve_customer=lambda request: {
"id": str(request.state.user.company_id),
"plan": request.state.user.plan,
} if hasattr(request.state, "user") else None,
)
The installer stores the client at app.state.apirelio and flushes it during FastAPI shutdown.
Bodies, query strings, cookies, authorization values, email addresses and IP addresses are never
captured. Python 3.9+, FastAPI 0.100+ and FastAPI versions below 1.0 are supported.
Metadata
Release files for apirelio-fastapi 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| apirelio_fastapi-0.2.1.tar.gz | 6.2 kB | With provenance | Details for apirelio_fastapi-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| apirelio_fastapi-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for apirelio_fastapi-0.2.1-py3-none-any.whl |
Total release size: 11.9 kB
Release files / apirelio_fastapi-0.2.1.tar.gz
| Download URL | apirelio_fastapi-0.2.1.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d30459acc3151a26757a0bcb0baa717cb664b787fdeab2803095f7a40493cec
|
|
BLAKE2b-256 checksum How to use checksums |
719178d2ce16287bf95c9c0fce3199df4ea6d9ddc4c7615e40e502bcb65328ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logRelease files / apirelio_fastapi-0.2.1-py3-none-any.whl
| Download URL | apirelio_fastapi-0.2.1-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5652390ede124a3fcb52e7fa719f8e56a6d5ff3c40181277c7f4c1e14b2db5a1
|
|
BLAKE2b-256 checksum How to use checksums |
e3c329043ab6c9ed1e80e94f46011fca5f3ea562c68e3ae8884dc9015d6a4b9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logSecurity for apirelio-fastapi 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for apirelio_fastapi-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.