Skip to main content

AperioFlow for Python

Report errors from Python 3.8 or later to an AperioFlow project. No dependencies: events go to your project's ingest URL with urllib.

Not on PyPI yet. Until it is, copy the aperioflow folder into your project.

Set up

Open the project in AperioFlow, choose Set up reporting and copy the ingest URL.

import aperioflow

aperioflow.init(
    "https://app.aperioflow.co.uk/ingest/YOUR_KEY",
    release="1.4.0",          # optional, groups events by release and finds regressions
    environment="production",  # optional
)

After init, uncaught exceptions are reported through sys.excepthook; the previous hook still runs, so the traceback is printed and the program exits as before (capture_uncaught=False turns that off).

Report errors yourself

try:
    charge_card(order)
except Exception as exc:
    aperioflow.capture_exception(exc, fingerprint="card-charge", extra={"order_id": order.id})

aperioflow.capture_message("Queue is backing up", level="warning")
aperioflow.add_breadcrumb("Started nightly import", category="job")
aperioflow.set_tag("region", "eu-west-2")
aperioflow.set_user(id=user.id)  # only the id is sent

capture_exception() with no argument reports the exception being handled. Sends wait for the answer (5 seconds at most); pass background=True to init to send on a thread, and call aperioflow._client.flush() before the program exits.

Options

Option What it does
ingest_url Required. The project's ingest URL.
release, environment Sent with every event.
sample_rate 0 to 1 (default 1). The share of events sent.
before_send(event) Change an event, or return None to drop it.
capture_uncaught Default True.
timeout, background How long one send may take (default 5 seconds), and whether to send on a thread.

Privacy

  • Nothing about the user, the machine or its IP address is collected on its own. A user id is sent only when you call set_user, and only the id, whatever else you pass.
  • Before an event leaves the process, values of keys that name a secret (password, token, cookie, authorization, api_key and the like), Bearer and Basic credentials, email addresses and card numbers are replaced with [redacted] markers. The server scrubs again before it stores anything.
  • Breadcrumbs are limited to the latest 50, and the event's extra data to the server's 20 KB.
  • A failed send never raises into your app.

Tests

python3 -m unittest

Metadata

Release files for aperioflow 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aperioflow 0.1.0
File Size Uploaded Provenance Actions
aperioflow-0.1.0.tar.gz 7.8 kB Without provenance Details for aperioflow-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aperioflow 0.1.0
File Interpreter ABI Platform Actions
aperioflow-0.1.0-py3-none-any.whl Python 3 none any Details for aperioflow-0.1.0-py3-none-any.whl

Total release size: 14.0 kB

Release files / aperioflow-0.1.0.tar.gz

Download URL aperioflow-0.1.0.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
deecd67ca4f16b90cac3e40e780ec5fa3c6d2ec48d6f6c8a7db4c05b37151ece
BLAKE2b-256 checksum
How to use checksums
aa96e2636a015f9b0124445342858903e8d4899cfd1f833b66f30a07e6645377
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / aperioflow-0.1.0-py3-none-any.whl

Download URL aperioflow-0.1.0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4282284ec360629dc515061db760f4c72b7f79a66c749048190ff2ef978b682b
BLAKE2b-256 checksum
How to use checksums
dac336cbada8fb312a4b322a5ec47b86abe872d5da66d17df24e01591216bbba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for aperioflow 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page