High-performance, schema-agnostic event bus for AI runtime workloads
Actively maintained. Last release 13 days ago, commits in 26 of the last 26 weeks. A safe choice.
pip install net-meshNet Python
The PyO3 extension for the Net mesh — a latency-first encrypted mesh where services and agents announce capabilities, discover each other, and invoke work over typed RPC.
Most people want net-mesh-sdk
instead. That's the Pythonic wrapper — context managers, generators, typed
channels, dataclass and Pydantic support — and it depends on this package. Use
net-mesh directly when you want the raw binding, or need one of the few
surfaces the wrapper doesn't re-export.
Docs: https://ai2070.net/docs/sdk/python/quickstart · Concepts
Install
pip install net-mesh
Publishes as net-mesh, imports as net.
Quickstart
from net import Net
with Net(num_shards=4) as bus:
bus.ingest_raw('{"sensor": "lidar", "range_m": 12.5}')
bus.ingest({"sensor": "radar", "range_m": 45.0})
# Cursor-paginated. None starts from the earliest buffered event.
resp = bus.poll(100)
for event in resp.events:
print("event", event)
# resp.next_id -> pass back as `cursor` to page forward
stats = bus.stats()
print(stats.events_ingested, "ingested,", stats.events_dropped, "dropped")
Ingest returns once the event is accepted into the local ring buffer —
acceptance, not delivery. Under backpressure events can drop; check
events_dropped. See
Submitted Is Not Completed.
What lives only here
The wrapper re-exports most of this module, with two notable exceptions you
must import from net directly:
from net import RedisStreamDedup # consumer-side dedup helper
from net import RpcTimeoutError, RpcError # the nRPC error family
See Deduplication and
Errors — the latter documents a
trap worth knowing: without the nRPC feature compiled in, every Rpc*Error
aliases down to Exception.
Cargo features
PyPI wheels ship every feature enabled, so this only matters for source builds via , where a disabled feature's classes are simply absent from the module.