Skip to main content

loop-node

loop-node is the low-level runtime and wire protocol shared by Loop and loop-sdk. Most integrations should use loop-sdk directly; use loop-node when building a lower-level Node API or integration layer.

Installation

pip install loop-node

Published wheels support CPython 3.10–3.14 on Linux x86_64 (glibc 2.28+). They contain compiled implementation modules and type stubs; installation does not require a compiler.

Minimal example

import time

from loop_node import (
    EmptyConfig,
    FieldContract,
    LifecycleState,
    Node,
    NodeConnectionConfig,
    PayloadContract,
    ValueKind,
)

VALUE = PayloadContract(fields={"value": FieldContract(kind=ValueKind.SCALAR)})

node = Node(config_type=EmptyConfig)
output = node.declare_stream_output("value", payload_contract=VALUE)
node.start(
    node_id="example_node",
    connection=NodeConnectionConfig(loop_endpoint="tcp/127.0.0.1:7448"),
)

try:
    while node.is_running:
        node.process_control()
        if node.status.lifecycle is LifecycleState.ACTIVE:
            output.publish(timestamp_ns=time.time_ns(), payload={"value": 1.0})
        time.sleep(0.1)
finally:
    if node.status.lifecycle is not LifecycleState.FINALIZED:
        node.shutdown()
    node.close()

A Node declares its Config and Ports before connecting. Loop supplies the validated Config, Port bindings, and lifecycle operations. Call process_control() regularly to handle lifecycle requests from Loop. Use the Node lifecycle state to decide when your application should exchange Graph data. In most cases, only exchange data while the Node is ACTIVE.

Lifecycle

All Nodes use IDLE → Configure → CONFIGURED → Start → ACTIVE. Configure validates Config and calls optional on_configure(config) before Port binding. Start takes only bindings and calls optional on_start(). Stop and ResetFault return to IDLE; each restart requires Configure again. Configure may update existing payload contracts. The Orchestrator validates the resulting graph before starting Nodes. Port names and kinds stay fixed.

Describe returns the Config schema and current Port contracts for inspection. Loop uses Configure results for payload compatibility checks; contracts read through Describe are not treated as finalized for a run.

Shared-memory streams

Use the shared_memory communication profile for Stream ports between Nodes on the same machine. It supports every payload value type: scalars, booleans, strings, tensors, images, and audio. A message may contain multiple binary fields, optional fields, or no binary fields. Logical types and payload contract validation still apply. Request/Reply continues to use protobuf.

In a Cell Config, select communication_profile: shared_memory on the consumer binding. In a low-level Graph Config, define a bounded profile:

communication_profiles:
  local_shared:
    transport: zenoh
    stream_mode: shared_memory
    shared_memory_pool_size_bytes: 67108864

Reference local_shared from the consumer binding. The pool limit must cover all binary fields in a message and messages retained by subscribers, with room for allocation overhead. Allocation exhaustion raises an error; the transport does not silently fall back to ordinary bytes. Profile selection is explicit; this change does not automatically switch small messages to SHM.

The wire format has a Protobuf metadata attachment and one contiguous SHM allocation. Each image, tensor, or audio field has an offset and byte length in that allocation. Binary bytes are copied directly into their destination ranges without first building a combined Protobuf byte string. Scalar fields remain in the attachment. Messages with no binary bytes use one padding byte because Zenoh requires a nonempty allocation; SHM offers no bulk-copy advantage for those messages.

The receiver validates the message and all buffer references, layout, and sizes. Image/audio buffers retain the original Zenoh Sample, including after the subscriber closes. Zenoh Python 1.9.0 does not expose received SHM through the Python buffer protocol: packed ranges share a lazy Python snapshot, and tensor decoding materializes that snapshot to preserve TensorValue.data as a read-only memoryview. This is not end-to-end zero-copy NumPy access.

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

loop_node-0.2.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

loop_node-0.2.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

loop_node-0.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

loop_node-0.2.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (998.5 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

loop_node-0.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

loop_node-0.2.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (984.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

loop_node-0.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (944.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64manylinux: glibc 2.28+ x86-64

loop_node-0.2.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (884.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

loop_node-0.2.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (918.6 kB view details)

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

loop_node-0.2.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (862.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

File details

Details for the file loop_node-0.2.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for loop_node-0.2.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 24d2b1a1fceae007d94d29fc5f3e0c740c4f71569d0cc6207d5575e23de6cfd4
MD5 6802f3c67d2e5178a7ed418dd6ad7ef9
BLAKE2b-256 9a6e710b5eb04b40065a6e489546f26ded15039d9feee69f43fae849ecf379e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for loop_node-0.2.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: loop-node-publish.yml on configinc/loop

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

File details

Details for the file loop_node-0.2.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for loop_node-0.2.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 200377da98e939b3ec4051c555cb628a01426391fd6f27e95620d37081bb6285
MD5 1b53ed651bdf792a0987df4252eb0be4
BLAKE2b-256 5f11958d87f4c864bc72ded2cfb91cb0e53494b2a458126335b9af13db68f328

See more details on using hashes here.

Provenance

The following attestation bundles were made for loop_node-0.2.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: loop-node-publish.yml on configinc/loop

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

File details

Details for the file loop_node-0.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for loop_node-0.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cc9982f2d4d2a250edd7dfad98812d19c78fe8e55eaf5d82d0c7eda3d4cd999f
MD5 0836b627c38d0001725404b692f8e774
BLAKE2b-256 fc0e5ada6df306e14cee9e11f52c04081e871a355c24cab9162aea6d8bc84b55

See more details on using hashes here.

Provenance

The following attestation bundles were made for loop_node-0.2.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: loop-node-publish.yml on configinc/loop

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

File details

Details for the file loop_node-0.2.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for loop_node-0.2.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 db365df1811496903ddfa9a86c685bf7b7b51523ac8b7f5daac89e306e0d7592
MD5 4021d6cdf1c2b9be614580cbb602c955
BLAKE2b-256 84e84fa0dbc9a4bc886ae4ae5f001d26e93a6efb9cc1e54000e177b02a36ef5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for loop_node-0.2.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: loop-node-publish.yml on configinc/loop

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

File details

Details for the file loop_node-0.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for loop_node-0.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e5ef6b9edfc57350d7a836f02e3f839e159fdf345a677a4781bf362c178b4291
MD5 8dbf114a5cba89b8becdf25552757376
BLAKE2b-256 7d9921d99fc0cf10d38946ccb59d7c5968e9f904b9171d9e6b32d817997408b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for loop_node-0.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: loop-node-publish.yml on configinc/loop

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

File details

Details for the file loop_node-0.2.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for loop_node-0.2.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6671ee74557a15dfba7158c0f3379502965ad96d66f2e8fd835e16bebc031887
MD5 a8c4fddb547eea8bd49df4e8698f99ad
BLAKE2b-256 21426c93eacf5439174e6fa9f888847657bb488d4427ec914789115117add891

See more details on using hashes here.

Provenance

The following attestation bundles were made for loop_node-0.2.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: loop-node-publish.yml on configinc/loop

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

File details

Details for the file loop_node-0.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for loop_node-0.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d76dc4603fc18699412b49ba1d1b4e32ba680b069201221f862d1fbc90a19bac
MD5 acf7d9e0883089c43f577e48eb3afba3
BLAKE2b-256 2b7a3c9386c22b2dfd9d679c2232ded3c55c6e7db459ace6e80d73d282050baa

See more details on using hashes here.

Provenance

The following attestation bundles were made for loop_node-0.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: loop-node-publish.yml on configinc/loop

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

File details

Details for the file loop_node-0.2.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for loop_node-0.2.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 918cfda261c9d1751a8bed3b8cc348d3f92cb0d8fae6e8a0ef244934ec022f3c
MD5 0f30dc927b2ea995ccad468988937b5e
BLAKE2b-256 ae01ab2875ddab00b11a922afb3dbf8e746e781ec39f1dc9cbc6240f0cee8a05

See more details on using hashes here.

Provenance

The following attestation bundles were made for loop_node-0.2.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: loop-node-publish.yml on configinc/loop

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

File details

Details for the file loop_node-0.2.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for loop_node-0.2.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c60b58894ddd17e72fc5b4cddf66be425dcaf8bb485affe04ca60cde5b58afda
MD5 a7e1314f2df47a90ed9fe00021cb0c95
BLAKE2b-256 37d1bb22fd3d436899c94fec8932b1b595651140074793774577828fc02db377

See more details on using hashes here.

Provenance

The following attestation bundles were made for loop_node-0.2.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl:

Publisher: loop-node-publish.yml on configinc/loop

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

File details

Details for the file loop_node-0.2.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for loop_node-0.2.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7ef4103cf32783a7ea976945228b8db0c62c0e25b9bdedcc3a92d129fadd43e2
MD5 d8d4bcf2ce21ccbc8e57d53143ac46ad
BLAKE2b-256 e83f0749f072ed9408622cde2fd8a2e6123f550900dfc181ee275e082200ca18

See more details on using hashes here.

Provenance

The following attestation bundles were made for loop_node-0.2.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: loop-node-publish.yml on configinc/loop

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

Release history Release notifications | RSS feed

0.3.0

10 files

This release

0.2.0 This release

10 files

0.1.0

10 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