Asgarde
Error handling and dead letter queues for Apache Beam Python, without the boilerplate. Also available for Java and Kotlin with Asgarde Java.
📖 Documentation: https://tosun-si.github.io/asgarde/
Why Asgarde
With plain Beam, each step needs its own DoFn with a try/except block and tagged outputs, and all the failures
must be flattened at the end. Asgarde keeps a fluent flow and gathers the failures of all the steps:
from asgarde import CollectionComposer
result = (CollectionComposer.of(values)
.map('Trim', lambda value: value.strip())
.map('Parse', int)
.filter('Keep even numbers', lambda number: number % 2 == 0))
outputs = result.outputs # Output of the last step
failures = result.failures # The failures of all the steps, for your dead letter queue
Installation
Asgarde is published on PyPI. apache-beam is a minimum version, not a pin:
your pipeline brings its own Beam version.
uv add asgarde # or: pip install asgarde
Features
- One place for all the errors: each step catches its errors in a
Failure(with the stack trace), theCollectionComposergathers the failures of all the steps. map,flat_mapandfilteroperators with side inputs and DoFn lifecycle actions, andFailure.from_exceptionfor your own DoFn.- Origin element: with
with_origin_element, the failures also give the element that entered the flow, to debug and replay from the start. Evaluated only when a failure occurs. - Never breaks your job: non picklable exceptions,
non JSON dicts, partial
flat_mapoutputs, deterministic labels for Dataflow updates. - Failure metrics: a Beam counter per step.
- Typed (
py.typed).
Compatibility
Python 3.10 to 3.14, apache-beam>=2.60.0. The CI tests the minimum Beam version and the latest Beam release on
every push and every week. See Compatibility.
Roadmap
See the roadmap: replayable input element, Beam schema for the failures, ready-to-use failure sinks...
Contributing
Contributions are welcome, see CONTRIBUTING.md.
License
Release files for asgarde 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| asgarde-1.2.0.tar.gz | 128.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| asgarde-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 137.5 kB
Release files / asgarde-1.2.0.tar.gz
| Download URL | asgarde-1.2.0.tar.gz |
|---|---|
| Size | 128.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6eb8e65e8fb887ba9c23ac02a4856352df3c67861b478c84e48895867643a52
|
|
BLAKE2b-256 checksum How to use checksums |
ac824598a6dc7d898b855ec3bc1f20fd3fee3f92a9cb126354dca7d38f449c11
|
| 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 24, 2026.
Transparency logRelease files / asgarde-1.2.0-py3-none-any.whl
| Download URL | asgarde-1.2.0-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7612c51e806b176e15d74cc62d4899ace73eecfeae79ad56cb25892a8adde0d5
|
|
BLAKE2b-256 checksum How to use checksums |
eba8fb0d226e912672b798693e769f5c5090535f3ffd4fa2ba0fdfad20116e66
|
| 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 24, 2026.
Transparency log