Skip to main content

Traversal

Concurrent DAG execution for Python, powered by Rust. Free, MIT licensed, in-process, and built for ordinary Python functions and tool calls.

Traversal owns dependencies, readiness, concurrency limits, and structured node outcomes. Your functions own the work. Use an external scheduler to start runs. No service, account, telemetry, or Python runtime dependency is required.

Install

python -m pip install 'traversal==0.2.0'

Includes graph execution, local run history, explicit JSON result reuse and guarded resume. Supports conventional CPython 3.11–3.14 and free-threaded CPython 3.14t. Release wheels target Linux x86_64 (glibc 2.28+), macOS Apple Silicon, and Windows x86_64. Source builds require Rust and Maturin.

A graph in a few lines

from traversal import Graph

graph = Graph("report")
source = graph.add("source", lambda: 5)
left = graph.add("left", lambda n: n * 2, source)
right = graph.add("right", lambda n: n + 3, source)
total = graph.add("total", sum, [left, right])

plan = graph.compile(total)
print(plan.describe())
report = plan.run(max_concurrency=2).raise_for_status()
print(report.outputs["total"])  # 18

Left and right are independently eligible after source completes. Total waits for both. Only requested targets and their ancestors run. Nested lists, tuples, and dictionary values can contain Node references. after=[node] adds an ordering dependency without passing a result. after is a reserved API keyword.

Async functions run on the event loop; ordinary functions use a bounded thread pool. Inside an event loop, use await plan.arun(). On free-threaded CPython 3.14t, independent synchronous Python functions can execute on multiple cores. Regular CPython still limits Python CPU threads through the GIL. Cancellation stops new admission and drains blocking work; tasks should set their own I/O timeouts.

Inspect report.states, report.outputs, and report.failures. Failures include exception type, message and traceback. Independent branches continue; descendants of a failed node are blocked. Calling raise_for_status() is optional.

Plans freeze topology and binding containers. Arbitrary Python objects remain references; shared mutation requires caller coordination. Reports retain all successful intermediate outputs until released. Rerunning performs work again: there is no exactly-once guarantee for external actions.

Multicore Python (0.2.0)

Use a separate free-threaded environment for CPU-heavy Python branches:

uv python install 3.14t
uv venv --python 3.14t .venv-t
uv pip install --python .venv-t 'traversal==0.2.0'
uv run --python .venv-t --no-project python -c "import traversal, sys; print(sys._is_gil_enabled())"
# False: the GIL is disabled in this interpreter.

The same plan.run(max_concurrency=4) API works. Check GIL status after importing all workload dependencies: another extension can enable it. This is an optional Python build, not a flag that turns ordinary CPython into a free-threaded build. Use synchronous functions for CPU branches; CPU work inside async def still blocks the event loop. Coordinate shared mutable inputs explicitly.

In one macOS arm64 measurement, eight workers ran a Python CPU graph in 80 ms on 3.14t versus 275 ms on regular 3.14.5. This is workload-specific, not a promised speedup. Tiny tasks should be batched. See performance evidence and the skill's parallelism guide.

Remember runs and reuse results

from traversal import Cache, Graph, History

history = History(".traversal/runs.sqlite")
graph = Graph("totals", version="1", store=history)
source = graph.add("source", lambda: [1, 2, 3], cache=Cache("input-v1"))
total = graph.add("total", sum, source, cache=Cache("sum-v1"))
plan = graph.compile(total)
first = plan.run().raise_for_status()
print(history.latest(graph="totals"))
print(plan.explain_run(previous=first.run_id))
second = plan.resume(first.run_id)  # Reuses compatible JSON results.

Cache is an explicit declaration that a computation is safe to repeat or skip. Its key must cover changing code, inputs and configuration. All ancestors need keys for downstream reuse. Previously started non-cache work requires a named rerun decision during resume; unknown external effects are never silently replayed. History is opt-in and local. Default records omit task payloads and error messages; caching explicitly opts into bounded JSON result storage. No pickle.

See the complete API and boundaries.

Install the agent skill

The version-matched skill ships in the wheel:

python -m traversal skill --output ~/.codex/skills/traversal

Use your agent's skill directory, or export to any new directory. The command refuses to overwrite an existing folder. The canonical skill teaches PyPI setup, graph construction, execution, and failure inspection. Its examples are executed in CI against the installed wheel. A standalone download is also available in the CI run's traversal-skill artifact.

Develop

Install Rust and uv, then:

uv sync --locked --no-install-project
uv run --no-sync maturin develop --release
uv run --no-sync pytest
cargo test --locked -p traversal-core

Rust topology/state and PyO3 bindings are separate crates. Python adapters have no third-party runtime dependency. PyPy, process pools, distributed workers, connectors and calendar scheduling are outside this release.

Owner: Trevor Ewert / KWIP LLC. MIT license.

Download files

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

Source Distribution

traversal-0.2.0.tar.gz (66.1 kB view details)

Uploaded Source

Built Distributions

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

traversal-0.2.0-cp314-cp314t-win_amd64.whl (166.8 kB view details)

Uploaded CPython 3.14tWindows x86-64

traversal-0.2.0-cp314-cp314t-manylinux_2_28_x86_64.whl (312.3 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ x86-64

traversal-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl (272.1 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

traversal-0.2.0-cp314-cp314-win_amd64.whl (166.4 kB view details)

Uploaded CPython 3.14Windows x86-64

traversal-0.2.0-cp314-cp314-manylinux_2_28_x86_64.whl (311.9 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

traversal-0.2.0-cp314-cp314-macosx_11_0_arm64.whl (272.7 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

traversal-0.2.0-cp313-cp313-win_amd64.whl (165.6 kB view details)

Uploaded CPython 3.13Windows x86-64

traversal-0.2.0-cp313-cp313-manylinux_2_28_x86_64.whl (311.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

traversal-0.2.0-cp313-cp313-macosx_11_0_arm64.whl (270.7 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

traversal-0.2.0-cp312-cp312-win_amd64.whl (165.8 kB view details)

Uploaded CPython 3.12Windows x86-64

traversal-0.2.0-cp312-cp312-manylinux_2_28_x86_64.whl (311.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

traversal-0.2.0-cp312-cp312-macosx_11_0_arm64.whl (271.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

traversal-0.2.0-cp311-cp311-win_amd64.whl (169.0 kB view details)

Uploaded CPython 3.11Windows x86-64

traversal-0.2.0-cp311-cp311-manylinux_2_28_x86_64.whl (314.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

traversal-0.2.0-cp311-cp311-macosx_11_0_arm64.whl (275.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file traversal-0.2.0.tar.gz.

File metadata

  • Download URL: traversal-0.2.0.tar.gz
  • Upload date:
  • Size: 66.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for traversal-0.2.0.tar.gz
Algorithm Hash digest
SHA256 07ee48d6f68906f1adc7c8a137e38f71aa845487a632aa9f49f38f504b7ad5aa
MD5 f53b9a8e760c919d3e51bcb31b82ee7f
BLAKE2b-256 59399a77dc57426dff8509a0a57af29fd0fb6039351095e4c01c404871259e86

See more details on using hashes here.

Provenance

The following attestation bundles were made for traversal-0.2.0.tar.gz:

Publisher: publish.yml on kwip-info/traversal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file traversal-0.2.0-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: traversal-0.2.0-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 166.8 kB
  • Tags: CPython 3.14t, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for traversal-0.2.0-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 473d63bae79a9565d46ec564dab8f3affda622ff47c1457b4ae77c7622f12e86
MD5 9295b7749b4ffbea51c4169fe95ccbbb
BLAKE2b-256 476b9a73c6bf241099476780afc13e506ea07335acc7dc6acc6a6152d818575e

See more details on using hashes here.

Provenance

The following attestation bundles were made for traversal-0.2.0-cp314-cp314t-win_amd64.whl:

Publisher: publish.yml on kwip-info/traversal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file traversal-0.2.0-cp314-cp314t-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for traversal-0.2.0-cp314-cp314t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b7eea1c5a52d323048f87866860047f21d56f55eac88d8fd5d153ce9ee686a50
MD5 5a30dc9680bb25ec35173822d2f1e80d
BLAKE2b-256 42692b374e34fcf0001f83cf42835ebde3c77dd2f479412534e3fd90a312fbb0

See more details on using hashes here.

Provenance

The following attestation bundles were made for traversal-0.2.0-cp314-cp314t-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on kwip-info/traversal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file traversal-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for traversal-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 36dfdb8e7cb890edcb9fe34196479328665bbfca1cb9b15b19fa6d95ec983a25
MD5 340270205d9352d09dcc8ecee9c890e6
BLAKE2b-256 96f24a41e48b8d64ec9fc801e1ded11b72c235f86ca0aa2028a531e346931cea

See more details on using hashes here.

Provenance

The following attestation bundles were made for traversal-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl:

Publisher: publish.yml on kwip-info/traversal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file traversal-0.2.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: traversal-0.2.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 166.4 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for traversal-0.2.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 3468e624f46a92bf499ead4a7d644df2b5e867c8e216f883da5d1589fe904897
MD5 c202526548feb187bd46d1a52558d506
BLAKE2b-256 8bb5fa005e527f065b8e45d88209daf122ca4cb79e5a0e4824f7a4914b2f7c73

See more details on using hashes here.

Provenance

The following attestation bundles were made for traversal-0.2.0-cp314-cp314-win_amd64.whl:

Publisher: publish.yml on kwip-info/traversal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file traversal-0.2.0-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for traversal-0.2.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9d83857040d223f8a411ea7391f7aa750e93eb126acefbe76f518417c90faa01
MD5 40317b2f7ab13ac39b22f1be8cacfd3f
BLAKE2b-256 2e39ef8802f7dae45603bf7719313c1f2e231e55d357bf9075d3265661484f1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for traversal-0.2.0-cp314-cp314-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on kwip-info/traversal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file traversal-0.2.0-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for traversal-0.2.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b4250f2309c902a36a4f4f302e65957683e41c69138f98cc723704fe9bb2b717
MD5 9a87e5fafaff9eb898d5b090476ac166
BLAKE2b-256 7a36c2274f7ac24747f290272b772e773f2a821d586036d78b753dbdfffece48

See more details on using hashes here.

Provenance

The following attestation bundles were made for traversal-0.2.0-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: publish.yml on kwip-info/traversal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file traversal-0.2.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: traversal-0.2.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 165.6 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for traversal-0.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d067b08b835f78a247db0de65775a69c0d1c91267376aefaee2fe42861ab5dce
MD5 d153c01e19fe0fc993ffaa7611e36ebe
BLAKE2b-256 5dc59a946e1ca0a3d521c1c10ad63ef79db819c96752465d671d4cd9a8a26a88

See more details on using hashes here.

Provenance

The following attestation bundles were made for traversal-0.2.0-cp313-cp313-win_amd64.whl:

Publisher: publish.yml on kwip-info/traversal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file traversal-0.2.0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for traversal-0.2.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1b2b5f300c0d2d129f4543dd26f80667dd5c600db7a4452fdeb2860b60f40612
MD5 5ea7447cf10a20f67cc5f599f5cf8929
BLAKE2b-256 ae2367d3181cc7188d266eccecb0c251d895da87143b5b35049508ac724e7274

See more details on using hashes here.

Provenance

The following attestation bundles were made for traversal-0.2.0-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on kwip-info/traversal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file traversal-0.2.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for traversal-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bb675cfc4f10fa92254d49f733ad1dd13204dad9900831f744bf317c21f493a2
MD5 d95c90f0f3cba3fac3e470d072e4e4a2
BLAKE2b-256 35fa7897ccd08d829536d1d289481d9d9c094342af54200ecbe40c5b50ba6d71

See more details on using hashes here.

Provenance

The following attestation bundles were made for traversal-0.2.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: publish.yml on kwip-info/traversal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file traversal-0.2.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: traversal-0.2.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 165.8 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for traversal-0.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3d252ca1082492d5c40ce4c75deff23c995760b5d838f3c455409aaa6524f1b6
MD5 797cd2bf79554973dce30246a2772460
BLAKE2b-256 3904ba362de05fbceaff9cb5d051480f92ea7ad39319bd52f7ae15f72de98f71

See more details on using hashes here.

Provenance

The following attestation bundles were made for traversal-0.2.0-cp312-cp312-win_amd64.whl:

Publisher: publish.yml on kwip-info/traversal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file traversal-0.2.0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for traversal-0.2.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 77d46b2227899f09442e5ac656735f0f4a546b6ed5f91a85af2abdb2a70934da
MD5 7e0f20b9d1c82288d0593408e94961ce
BLAKE2b-256 56a5dbe21b3136047a5f9fdc1b5ec07126a08d1246459f2b104aaa5d2bf23a82

See more details on using hashes here.

Provenance

The following attestation bundles were made for traversal-0.2.0-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on kwip-info/traversal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file traversal-0.2.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for traversal-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 87efa53cb73dcfdeb7d18e0f82af23421add94948da066ea1dcf16842458b1b4
MD5 478a60974b7f432f1cb87d7c0bc84316
BLAKE2b-256 e7d160cddfbf5cd4ee66ce898c22c2ca1e77758f845ba4d1e2a561b41dd0f8cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for traversal-0.2.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: publish.yml on kwip-info/traversal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file traversal-0.2.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: traversal-0.2.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 169.0 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for traversal-0.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0e01996f50e0cfc0e2b7d000d0f37dd3d517c7943267c9eab1807035043dca45
MD5 0cfda3da8f61e1dd28c0dd3cba4a4b5d
BLAKE2b-256 ae13dca255456139240155c46ee5b0762277b2892926ec2afe99f869084de0ae

See more details on using hashes here.

Provenance

The following attestation bundles were made for traversal-0.2.0-cp311-cp311-win_amd64.whl:

Publisher: publish.yml on kwip-info/traversal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file traversal-0.2.0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for traversal-0.2.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 248e68a27b32fbf86dc2ba2d5049d4c0cfb79126614ef581c347d1b57610acdc
MD5 b5b806cd8add5e4bccdda38ffcc2febc
BLAKE2b-256 f5687a4f4bb01eb27a3704897c690391f58faf31ffc350297b6d12f7f229a506

See more details on using hashes here.

Provenance

The following attestation bundles were made for traversal-0.2.0-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on kwip-info/traversal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file traversal-0.2.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for traversal-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 753d47edf3f65b2f22b82c35f382c5924877d4102373390a89ec1edd00389149
MD5 05b2fd95de54b7411dc8dbb53f6715f0
BLAKE2b-256 887c70004736821998707aa43d90318a6d379ee79506a540621a45d578367280

See more details on using hashes here.

Provenance

The following attestation bundles were made for traversal-0.2.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on kwip-info/traversal

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

16 files

0.1.0

13 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page