without-durability-postgres
without-durability's two
interfaces over one Postgres: three tables and a sequence, and no mechanism of its
own.
from psycopg_pool import AsyncConnectionPool
from without_durability_postgres import PostgresCheckpointer, PostgresDurable, PostgresScheduler, migrate
pool = AsyncConnectionPool(dsn, open=False)
await pool.open(wait=True)
await migrate(pool)
durable = PostgresDurable(PostgresCheckpointer(pool=pool), PostgresScheduler(pool=pool))
What is worth reading this package for is how little of it is mechanism. Every
write the Redis store needs a Lua script for is one statement here, or one
transaction, and neither is something this package supplies. Redis needs scripts
because it has no way to say "check this, then write that, and let nobody in
between"; SQL says it by default. The claim is an upsert whose DO UPDATE carries
a WHERE on the liveness deadline; the fenced record is one statement whose
updating CTE serializes it against a claim in flight and notes the write as a sign
of life in the same breath; the queue takes with
FOR UPDATE SKIP LOCKED, so several workers polling one table fan out instead of
queueing on its head.
Three things that are live questions over Redis do not arise. A workflow id is a
query parameter rather than key structure, so it carries no constraints at all.
Nothing expires, so the TTL that can lose a suspended workflow is gone, and the
fencing token can be an ordinary counter. And a default Postgres commits
synchronously, so record returning means what the durable runner assumes it
means.
SqlEffect is a callback handed a cursor inside the open transaction, so a step's
own business write and its checkpoint commit together: exactly-once for that step,
over the application's own tables. PostgresDurable extends that to the interface
above, committing a value's arrival and the workflow's wakeup at once, which is
what makes "you need no second system" a claim this can actually make. It is also
where "one datastore" stops meaning "Postgres", since a transaction is local only
on a single node.
See the
without-durability-postgres guide
(with the API reference)
for the statements, the schema, what co-location a sharded deployment owes, and
what a deployment still owes anyway (a sweep, and a real migration tool).
Metadata
Release files for without-durability-postgres 0.0.10
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 | Actions |
|---|---|---|---|---|
| without_durability_postgres-0.0.10.tar.gz | 20.2 kB | Without provenance | Details for without_durability_postgres-0.0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| without_durability_postgres-0.0.10-py3-none-any.whl | Python 3 | none | any | Details for without_durability_postgres-0.0.10-py3-none-any.whl |
Total release size: 41.8 kB
Release files / without_durability_postgres-0.0.10.tar.gz
| Download URL | without_durability_postgres-0.0.10.tar.gz |
|---|---|
| Size | 20.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13ae2e2b73a349253c136388ba5a52483e2aea65758b902d88b291addbefef6a
|
|
BLAKE2b-256 checksum How to use checksums |
d82b04e342ae94c1518a77945981b3cd6f91fa0e878f4d550a5934aa63bba70c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / without_durability_postgres-0.0.10-py3-none-any.whl
| Download URL | without_durability_postgres-0.0.10-py3-none-any.whl |
|---|---|
| Size | 21.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a9d39cc5bb49733499d6714119acc3d101b068fc116e8808133a845f741e6ee0
|
|
BLAKE2b-256 checksum How to use checksums |
20b7ca2cb87cb9871b3a019a65485ed455bd58ca47fa04f4b8f4e318d576c42d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for without-durability-postgres 0.0.10
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.