Skip to main content

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

apirelio_flask-0.1.0.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apirelio_flask-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

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

Hashes for apirelio_flask-0.1.0.tar.gz
Algorithm Hash digest
SHA256 401323e8d48324b7ae63916322e476701ffa2ca48ac554452cefaf5988620943
MD5 71f5be70729c88bd2f9f2ff791438340
BLAKE2b-256 74d3e7493a1667d3b01c018cd6b2e486d343158aee188ac28610182c77b5cd9c

See more details on using hashes here.

Provenance

The following attestation bundles were made for apirelio_flask-0.1.0.tar.gz:

Publisher: publish.yml on pryznar/apirelio-flask

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for apirelio_flask-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 764c81adbb9826a5d8d7abce3489fc22fb59552f781c368f8a538a81a670afa5
MD5 570f5199c5dbf9b5a50fc3057e3a7f6e
BLAKE2b-256 b41b309961036cef5185f0bda66508eeddf81cb89cdc78a490dfd84794d203ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for apirelio_flask-0.1.0-py3-none-any.whl:

Publisher: publish.yml on pryznar/apirelio-flask

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page