Skip to main content

PyO3-backed Manyfold RFC scaffolding and in-memory runtime.

Project description

manyfold

A schematic logical board with overlapping graph regions and circuit-style routes

Manyfold is a component library for execution graphs.

It helps make graph-shaped programs easier to build, inspect, and explain. Routes, schemas, buffers, demand, time, payload access, writes, taints, and lineage are modeled as graph concerns instead of being hidden in callback code or queue configuration.

Think of it as a logical board: routes are traces, ports are pads, components shape execution, and overlapping regions show where ownership, policy, and data flow meet.

This repository is an RFC-stage Python package with a PyO3/Rust extension. It is not a production runtime yet, but the package is runnable and the examples exercise the supported surface.

Start Fast

uv sync
uv run python examples/simple_latest.py
uv run python -m unittest tests.test_examples

Smallest useful shape:

from manyfold import Graph, Layer, OwnerName, Plane, Schema, StreamFamily, StreamName, Variant, route

graph = Graph()
temperature = route(
    plane=Plane.Read,
    layer=Layer.Logical,
    owner=OwnerName("sensor"),
    family=StreamFamily("environment"),
    stream=StreamName("temperature"),
    variant=Variant.Meta,
    schema=Schema.bytes("Temperature"),
)

graph.publish(temperature, b"72.4F")
latest = graph.latest(temperature)
assert latest is not None
print(latest.value)

Read Next

What It Models

  • Typed routes for logical signals.
  • Replayable latest-value reads and Rx-style observation.
  • Graph-visible node thread placement for main, background, pooled, or isolated execution.
  • Graph-visible capacitors, resistors, watchdogs, mailboxes, windows, and joins.
  • Explicit demand, retention, lazy payload access, and write-shadow state.
  • Lineage, taints, route audit snapshots, and topology queries.
  • Local file-backed stores and a small consensus component scaffold.

The public Python surface is intentionally narrow at the top level. Advanced helpers live under manyfold.graph, and the examples are the best way to see which parts are supported today.

Examples

The examples/ directory is organized as a short path through the mental model. Start with a route, add explicit demand, then move into joins, watermarks, planning, and taint-aware runtime behavior. The supported examples are validated by the regular unittest run so they do not drift away from the API.

Start here: create one typed route and read it back

  • examples/simple_latest.py: Smallest publish/read-back example.

Control the flow: make downstream demand visible

  • examples/rate_matched_sensor.py: A one-slot capacitor coalesces bursty reads behind explicit demand.

Fuse streams: coordinate independent sensors

  • examples/imu_fusion_join.py: Capacitors stage accelerometer and gyro streams before an event-time join.

Reason in time: release data by watermark progress

  • examples/rolling_window_aggregate.py: A capacitor discharges samples behind explicit event-time watermarks.

Scale the graph: plan repartition work explicitly

  • examples/cross_partition_join.py: A repartition join with skew metrics and planner output.

Audit the hard parts: mark nondeterminism on purpose

  • examples/ephemeral_entropy_stream.py: Per-request entropy derivation that taints determinism explicitly.

More involved operator, query, transport, mesh, and security coverage stays in tests/test_graph_reactive.py, with archived exploratory scripts kept under examples/archived/. The example manifest, README featured-example list, and RFC reference suite all derive from the shared example catalog, so supported versus archived status lives in one place.

Verify

Use uv run for Python commands.

cargo test
uv run ruff check
uv run python -m unittest discover -s tests -p 'test_*.py'
uv run python -m manyfold.rfc_checklist_gen --check
uv run manyfold-example-catalog --check
uv run python -m examples.catalog --check-readme

Repo Map

  • python/manyfold/: Python wrapper API.
  • src/: Rust in-memory runtime and PyO3 extension.
  • examples/: runnable examples covered by tests.
  • tests/: unittest suite.
  • docs/: onboarding, usage, performance notes, release notes, and RFC docs.

Project details


Download files

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

Source Distribution

manyfold-0.1.20.tar.gz (2.4 MB view details)

Uploaded Source

Built Distributions

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

manyfold-0.1.20-cp310-abi3-win_amd64.whl (399.1 kB view details)

Uploaded CPython 3.10+Windows x86-64

manyfold-0.1.20-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (560.5 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

manyfold-0.1.20-cp310-abi3-macosx_11_0_arm64.whl (514.6 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

manyfold-0.1.20-cp310-abi3-macosx_10_12_x86_64.whl (521.6 kB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file manyfold-0.1.20.tar.gz.

File metadata

  • Download URL: manyfold-0.1.20.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for manyfold-0.1.20.tar.gz
Algorithm Hash digest
SHA256 e7639bb2205f231c52d3048fd3746c51f489ffd1f9e4060e4066abca23e5248d
MD5 137de6e93e27308844f4a52c20dfe12b
BLAKE2b-256 0c7db5cbe91425f7bd43318721edf031835817661a4df59358e36b2165403836

See more details on using hashes here.

Provenance

The following attestation bundles were made for manyfold-0.1.20.tar.gz:

Publisher: pypi.yml on Organization5762/manyfold

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

File details

Details for the file manyfold-0.1.20-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: manyfold-0.1.20-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 399.1 kB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for manyfold-0.1.20-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 7b65441cd81ec5d53465bc968734f39d2a2cfe5745d8b30114042eed58158f31
MD5 865021e4bdac6d2bab60aa429ef1e262
BLAKE2b-256 ce6e67de9b3e6cf5ac9c6663c97c4628c2d21acf191a1a24f8af0bb44a6dffed

See more details on using hashes here.

Provenance

The following attestation bundles were made for manyfold-0.1.20-cp310-abi3-win_amd64.whl:

Publisher: pypi.yml on Organization5762/manyfold

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

File details

Details for the file manyfold-0.1.20-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for manyfold-0.1.20-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d4203eeef2a7721db4409345855e97e46eb27d1d5c226b45405f96ef410f73e4
MD5 63f5cbb279245a61adcf29e9f21657b9
BLAKE2b-256 824871e91c267c74a02e407f4a718ee59f0970bc1f7f7671e64c4ea592484bb3

See more details on using hashes here.

Provenance

The following attestation bundles were made for manyfold-0.1.20-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pypi.yml on Organization5762/manyfold

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

File details

Details for the file manyfold-0.1.20-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for manyfold-0.1.20-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f1c0ea5c5e569028c10384a9a93d27823b76c7a8c0ae9397b23ecc619283fd92
MD5 80cc6d887401ea398b080b4de36cda35
BLAKE2b-256 4a0374b7883cd0a4da22f6aade4789f495fd191d410281915c7e41ecf5e3a7d7

See more details on using hashes here.

Provenance

The following attestation bundles were made for manyfold-0.1.20-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: pypi.yml on Organization5762/manyfold

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

File details

Details for the file manyfold-0.1.20-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for manyfold-0.1.20-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 52192a07c1acf139ae1a4a7c16a1c908da5624c67c53a9d8780b2f8a2cc53c3a
MD5 aa707b6bb48cf88464870f6926319bb9
BLAKE2b-256 631b9eaa59dc52e760746c320ebdd1d97f2655bd4984d94fededf415dd78ad32

See more details on using hashes here.

Provenance

The following attestation bundles were made for manyfold-0.1.20-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: pypi.yml on Organization5762/manyfold

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

Supported by

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