Apirelio Flask SDK
Documentation · PyPI · Apirelio
Connect Flask errors, latency and releases to affected customers without capturing request or response payloads.
Native Flask request-lifecycle instrumentation for privacy-safe, customer-aware API analytics. It records the resolved URL rule and only enqueues after Flask has produced the response.
pip install apirelio-flask
import os
from flask import Flask, g
from apirelio_flask import install_apirelio
app = Flask(__name__)
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(g.account.id),
"name": g.account.name,
"plan": g.account.plan,
} if getattr(g, "account", None) else None,
)
Authentication must run before Apirelio's after_request resolver executes. Use get_request_context() inside a view to attach allow-listed scalar metadata or a stable error code.
The extension stores itself at app.extensions["apirelio"]. Bodies, query strings, cookies, authorization values, email addresses and IP addresses are never captured. Python 3.9+, Flask 2.3 and Flask 3.x are supported.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file apirelio_flask-0.1.0.tar.gz.
File metadata
- Download URL: apirelio_flask-0.1.0.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
401323e8d48324b7ae63916322e476701ffa2ca48ac554452cefaf5988620943
|
|
| MD5 |
71f5be70729c88bd2f9f2ff791438340
|
|
| BLAKE2b-256 |
74d3e7493a1667d3b01c018cd6b2e486d343158aee188ac28610182c77b5cd9c
|
Provenance
The following attestation bundles were made for apirelio_flask-0.1.0.tar.gz:
Publisher:
publish.yml on pryznar/apirelio-flask
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
apirelio_flask-0.1.0.tar.gz -
Subject digest:
401323e8d48324b7ae63916322e476701ffa2ca48ac554452cefaf5988620943 - Sigstore transparency entry: 2439633041
- Sigstore integration time:
-
Permalink:
pryznar/apirelio-flask@b9604c0a877d170c06cfd2bc94243e4341fb82e8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pryznar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b9604c0a877d170c06cfd2bc94243e4341fb82e8 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file apirelio_flask-0.1.0-py3-none-any.whl.
File metadata
- Download URL: apirelio_flask-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
764c81adbb9826a5d8d7abce3489fc22fb59552f781c368f8a538a81a670afa5
|
|
| MD5 |
570f5199c5dbf9b5a50fc3057e3a7f6e
|
|
| BLAKE2b-256 |
b41b309961036cef5185f0bda66508eeddf81cb89cdc78a490dfd84794d203ac
|
Provenance
The following attestation bundles were made for apirelio_flask-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on pryznar/apirelio-flask
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
apirelio_flask-0.1.0-py3-none-any.whl -
Subject digest:
764c81adbb9826a5d8d7abce3489fc22fb59552f781c368f8a538a81a670afa5 - Sigstore transparency entry: 2439633161
- Sigstore integration time:
-
Permalink:
pryznar/apirelio-flask@b9604c0a877d170c06cfd2bc94243e4341fb82e8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pryznar
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b9604c0a877d170c06cfd2bc94243e4341fb82e8 -
Trigger Event:
workflow_dispatch
-
Statement type: