Dispatch SDK for Python — error tracking and bug reports for the AI-native ticketing system.
Project description
dispatchitapp (Python)
The Python client for Dispatch — error tracking and curated bug reports for the AI-native ticketing system.
The core is stdlib-only, so a bare pip install dispatchitapp is a viable manual-capture
SDK (the gem's errors_only analogue). Framework adapters arrive as extras
(pip install dispatchitapp[django]) in a later phase.
import dispatchitapp
dispatchitapp.init(
api_key=os.environ["DISPATCH_API_KEY"],
environment=os.environ.get("ENV", "production"),
release=os.environ.get("GIT_SHA"),
)
try:
do_risky_thing()
except Exception:
dispatchitapp.capture_exception() # reads the current exception
# File a curated report (the API-only analogue of the widget):
dispatchitapp.report(description="Nightly import aborted: upstream 502", severity="high")
Process lifecycle (crash capture + shutdown flush)
init() installs the gem's at_exit analogues by default:
sys.excepthook— the exception about to kill the process (a crashing script, runner, or worker boot) is reported withsource: excepthook, then chained to the previous hook so the native traceback still prints.KeyboardInterruptis skipped — SIGINT is how process managers ask for a graceful stop, the gem's SIGTERM rule.atexitflush — the send queue drains at exit (up toshutdown_timeoutseconds, default 3.0; 0 skips) so shutdowns don't drop just-captured events. An explicitdispatchitapp.flush()is no longer needed before exit.
Opt out per hook with capture_at_exit=False / shutdown_timeout=0, or skip both with
init(..., install_lifecycle_hooks=False).
What's in the box
| Module | Role |
|---|---|
config |
Options → a frozen Config, with the gem's derivations and env gating. |
event |
build_event(exc) → the contract event; cause chain via __cause__/__context__ (≤5, oldest-first), 2000-char message cap. |
stacktrace |
traceback → frames (oldest-first), in_app excludes site-packages/stdlib, source context via linecache. |
ticket |
build_ticket_payload() → the { "ticket": {...} } body. |
transport |
Daemon worker + bounded queue.Queue(maxsize=100), drop-on-overflow, stdlib urllib, never raises. |
sampling / dedup |
rand > rate sampling; WeakSet identity dedup. |
client |
The capture pipeline: gate → dedup → sample → build → before_send → deliver. Never raises. |
lifecycle |
sys.excepthook crash capture + atexit queue flush (the gem's at_exit analogue). |
The wire shape is pinned by ../../contract; tests/test_conformance.py validates output
against those schemas.
Develop
python3 -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"
pytest # tests
mypy # strict typing (src)
ruff check . # lint
Project details
Release history Release notifications | RSS feed
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 dispatchitapp-1.0.0.tar.gz.
File metadata
- Download URL: dispatchitapp-1.0.0.tar.gz
- Upload date:
- Size: 125.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fea9befa28be8a1363c629180b9b875f15a5ababc3b8765a0b34f4d4e353f3c4
|
|
| MD5 |
782deff715c2981b10eab1c881de1376
|
|
| BLAKE2b-256 |
8883b06680231b29c0d039178eabd81b5df1a1961fa3d4dd02a1e8918f21e332
|
Provenance
The following attestation bundles were made for dispatchitapp-1.0.0.tar.gz:
Publisher:
release-python.yml on Recursivity-LLC/dispatch-sdks
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dispatchitapp-1.0.0.tar.gz -
Subject digest:
fea9befa28be8a1363c629180b9b875f15a5ababc3b8765a0b34f4d4e353f3c4 - Sigstore transparency entry: 1790754445
- Sigstore integration time:
-
Permalink:
Recursivity-LLC/dispatch-sdks@6a6dcdde3e69940f679c489ae58ae53a279a693d -
Branch / Tag:
refs/tags/py-v1.0.0 - Owner: https://github.com/Recursivity-LLC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@6a6dcdde3e69940f679c489ae58ae53a279a693d -
Trigger Event:
push
-
Statement type:
File details
Details for the file dispatchitapp-1.0.0-py3-none-any.whl.
File metadata
- Download URL: dispatchitapp-1.0.0-py3-none-any.whl
- Upload date:
- Size: 23.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7af18c8471bb388b3ebf845556f47b5cb377d17b8abbc14ab87f34e7eac5729
|
|
| MD5 |
13ccb74f456d0481604f2c158fb91a6a
|
|
| BLAKE2b-256 |
c4641f66c0e589514980fbb3c3026cd2c7c0ac02eda48bb2fef64d7a3bd05281
|
Provenance
The following attestation bundles were made for dispatchitapp-1.0.0-py3-none-any.whl:
Publisher:
release-python.yml on Recursivity-LLC/dispatch-sdks
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dispatchitapp-1.0.0-py3-none-any.whl -
Subject digest:
d7af18c8471bb388b3ebf845556f47b5cb377d17b8abbc14ab87f34e7eac5729 - Sigstore transparency entry: 1790754672
- Sigstore integration time:
-
Permalink:
Recursivity-LLC/dispatch-sdks@6a6dcdde3e69940f679c489ae58ae53a279a693d -
Branch / Tag:
refs/tags/py-v1.0.0 - Owner: https://github.com/Recursivity-LLC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@6a6dcdde3e69940f679c489ae58ae53a279a693d -
Trigger Event:
push
-
Statement type: