pip install baldur-framework
Your service failed at 03:12.
It was fine by 03:13.
Baldur wraps your critical paths in retries, circuit breakers, and a dead-letter queue that replays itself. Self-healing reliability for Python — no sidecar, no mesh.
from baldur import protected
@protected(name="payments.charge", retry=True,
circuit_breaker=True, dlq=True)
def charge(order_id: int) -> Receipt:
return gateway.charge(order_id)
- payment.charge TimeoutError — retry 1/3
- payment.charge TimeoutError — retry 2/3
- circuit payments OPEN — failing calls parked to DLQ
- gateway probe healthy
- circuit payments CLOSED
- dlq.replay — 31 parked calls replayed, 31 ok
- incident resolved — no one was paged
You were asleep for all of this.
The same 58 seconds, as your console saw them.
Every failure, heal, and replay lands in the healing ledger — the first thing you see on Baldur's built-in console. No extra infrastructure to stand up.
Reliability as a decorator, not a platform migration.
-
01 — decorate
Mark what must not fail
Wrap the calls that page you — payments, webhooks, third-party APIs. One decorator composes circuit breaker, retry, fallback, and DLQ; sane defaults, no config server.
-
02 — contain
Failures stop spreading
Retries with backoff absorb blips. When a dependency truly goes down, the circuit opens and failing calls park in the dead-letter queue instead of piling up.
-
03 — heal
Recovery runs itself
Baldur probes for recovery, closes the circuit, and replays every parked call in order. The incident closes before the postmortem doc opens.