Skip to main content

text pre-commit uv Ruff Built with Material for MkDocs


alt text

MeshNetworkX

Networkx Graphs synced across devices using Zenoh.
Explore the docs »

Report Bug · Request Feature

Quickstart

  • run zenohd -c .zenoh_docker/zenoh-myhome.json5 to create a storage
  • or docker compose up zenoh-host to create a storage.

then run the following pip install -e ".[examples]" to install the package.

Then run an example with python examples/main.py

Why?

  • If you model your application domain as a graph, this package makes it easy to run on multiple devices and automatically sync the graph between them.
  • It is a drop-in replacement for networkx, so you can use all the networkx methods on the graph.

How?

  • It is an abstraction on top of the Zenoh protocol, which is a very efficient protocol for IoT applications.
  • The graph is stored in a zenoh storage, for more information on how zenoh keeps storages alligned (even if the network becomes partitioned and then later reconnects), check here.
alt text

Example

Assuming:

  • you have two devices, and you want to create a graph on one device and access it on the other device.
  • you have a zenoh storage running on both devices.
  • Both devices can find each other using zenoh discovery (local network or using a Zenoh Router).

On device one:

import meshnetworkx as mx

G = mx.Graph()
G.add_node(1, color="red")
G.add_edge(1, 2, color="pink")

After that on device two:

import meshnetworkx as mx

G = mx.Graph()
print(G.nodes(data=True))
>>> [(1, {'color': 'red'}), (2, {})]

print(G.edges(data=True))
>>> [(1, 2, {'color': 'pink'})]

Release files for meshnetworkx 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for meshnetworkx 0.1.2
File Size Uploaded
meshnetworkx-0.1.2.tar.gz 14.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for meshnetworkx 0.1.2
File Interpreter ABI Platform
meshnetworkx-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 25.8 kB

Release files / meshnetworkx-0.1.2.tar.gz

Download URL meshnetworkx-0.1.2.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
79764e2cd05e5691b39b7a4827e2552121b652ef1c589a413b728565b6a7ec49
BLAKE2b-256 checksum
How to use checksums
320e3fc7a2f77d5aa5fe16cd76c2dbacec9e9c356fd081481ed1f01de3aefcf5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.4.28

Release files / meshnetworkx-0.1.2-py3-none-any.whl

Download URL meshnetworkx-0.1.2-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bab37d84d7037915f739ccf56abe2628b373402471ffff083e0db30966de6088
BLAKE2b-256 checksum
How to use checksums
126bfb182300e74a7c0a1e648c2960354036d5113d6fba58bf3558e1d6b2513e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.4.28

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release 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