Skip to main content

without-dag

Concurrent execution of DAG-shaped async workflows, liftable into a without Processor. A Processor[In, Out] is otherwise an opaque stream-to-stream closure; this package lets the inside of a per-event step be a graph of async sub-steps that run with bounded concurrency and recombine into one output. It is the value-level fan-out/fan-in the substrate leaves room for: one input value drives many concurrent computations.

Graph is the typed frontend: a builder that threads value types through the wiring so a mismatched dependency is a mypy error and a cycle is unrepresentable. It compiles once into a CompiledGraph, an async callable reused per event:

from without_dag import Graph


async def fetch(request: Request) -> Fetched: ...
async def parse(fetched: Fetched) -> Parsed: ...
async def render(fetched: Fetched, parsed: Parsed) -> Report: ...


graph, (request,) = Graph.of(Request)
fetched = graph.node("fetched", fetch, request)
parsed = graph.node("parsed", parse, fetched)
report = graph.node("report", render, fetched, parsed)
run = graph.build(output=report, limit=4)

result: Report = await run(some_request)

Each node runs once (memoized, so a diamond's shared ancestor executes a single time with no glitch), acyclicity is proven at the boundary via stdlib graphlib, and a single-input graph is an async (In) -> Out callable, exactly what from_map lifts into a Processor.

A node's key is a name you choose, so it means the same thing after a crash: run.stream(...) yields each (key, result) as it lands, and handing that mapping back as run(..., checkpoint=...) skips every step it names. Sink the pairs to a Redis hash or a table row under a workflow's idempotency key and the graph is a resumable durable workflow, with no engine underneath it. Resumable is a claim about one runner over time: running the same workflow from two processes at once needs the store to say who may write, which is a guarantee the store owns rather than the graph.

See the without-dag guide (with the API reference) for the full surface: the object-interface execution core (Plan, drive, evaluate), the typed frontend, resuming from a checkpoint, and lifting into a processor.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

without_dag-0.0.4.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

without_dag-0.0.4-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file without_dag-0.0.4.tar.gz.

File metadata

  • Download URL: without_dag-0.0.4.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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}

File hashes

Hashes for without_dag-0.0.4.tar.gz
Algorithm Hash digest
SHA256 2665fe1acd29e8a7a0138995f5429e9eb33e71752961ecb0f1f39661b3768f5f
MD5 6b8f03235dead5d7ee01c3d7025f7204
BLAKE2b-256 07f6439fdc272b8dc6841e938820600245d57481e9c5d6a33156bee16d329d20

See more details on using hashes here.

File details

Details for the file without_dag-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: without_dag-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","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}

File hashes

Hashes for without_dag-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ac37229a3a462a4ba5fa906413ec43ac22b0c20c9bd12e9c65648d9af8bc7b23
MD5 bf6c5fa8a15c6c617f748dec6fa58303
BLAKE2b-256 beebcfbe481fd6942e1088b68ce5e6dc3fa9c6d4b1467246ee215602ca6a93db

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page