Unhinged
Absurd is Armin Ronacher's durable execution engine for Postgres. Unhinged is the same engine on SQLite. No server, no dependencies, one file on disk.
from unhinged import Unhinged
app = Unhinged("app.db", queue_name="orders")
@app.register_task("fulfil-order")
def fulfil_order(params, ctx):
payment = ctx.step("charge", lambda: charge_card(params["card"], params["amount"]))
ctx.sleep_for("cooldown", 60)
shipment = ctx.await_event(f"shipped:{params['order_id']}", timeout=86400)
return {"payment": payment, "tracking": shipment["tracking"]}
app.spawn("fulfil-order", {"order_id": 42, "card": "tok_1", "amount": 1999})
app.start_worker(concurrency=4)
Steps run once. If the worker crashes, sleeps, or waits for an event, the next run skips the steps that already finished.
How it works
Same tables as Absurd, same procedure names. The stored procedures are
Python methods on Engine, each one a BEGIN IMMEDIATE transaction.
Workers poll. Several worker processes can share one file;
examples/chaos.py runs eight of them and kills one at random every
hundred milliseconds, and the test suite checks that every task still
completes, no run was ever executed by two processes, and a step only
re-ran when its lease had been reclaimed.
Every commit is fsynced, which survives a crash. On macOS that is not the
same as surviving a power cut; pass fullfsync=True for that, and expect
it to be slow. docs/durability.md has the whole story, including what
to do when the disk dies.
Run it
uv venv && uv pip install -e '.[dev]'
pytest
python examples/crash_demo.py
python examples/bench.py # calibrates the disk first; see BENCHMARKS.md
examples/release/ is a release checklist that survives Ctrl-C and waits
for approval. examples/pipeline/ is a resumable batch job.
examples/agent/ is an agent loop where every model call is a step.
python -m unhinged is the CLI.
What's not here
Partitioned queues, pg_cron, and the async SDK. Nothing deletes old tasks
unless you call app.cleanup() or pass maintenance_interval to
start_worker.
License
Apache-2.0, same as Absurd.
Metadata
Release files for unhinged 0.1.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 | Provenance | |
|---|---|---|---|---|
| unhinged-0.1.0.tar.gz | 63.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| unhinged-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 93.7 kB
Release files / unhinged-0.1.0.tar.gz
| Download URL | unhinged-0.1.0.tar.gz |
|---|---|
| Size | 63.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9082beedcf287382d544bab6391ec8d5b1cad6ac2a9726fd60cc413ab00d1cff
|
|
BLAKE2b-256 checksum How to use checksums |
87aa80c2cbadd4d1a5d6baed01b872cf4b3bd6852e8e6c4a76fc77a12d30be00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 23, 2026.
Transparency logRelease files / unhinged-0.1.0-py3-none-any.whl
| Download URL | unhinged-0.1.0-py3-none-any.whl |
|---|---|
| Size | 29.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ee80a1479d82d638c47a915e3875d70c4ffa1236bb05e0d6ab92b70491081cbf
|
|
BLAKE2b-256 checksum How to use checksums |
1f4be8a7f09378b7876fa8da9f4afd3f3c41762c3f40e8d1a5dd4938a5617457
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 23, 2026.
Transparency logSecurity for unhinged 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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for unhinged-0.1.0.tar.gz
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 Oct 23, 2026.
Transparency logA 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.