The repository or configuration that created this release differ from a previous release. View details.
Mesh - A Distributed Data Structure
Mesh - Distributed Data Structure for FastAPI Servers
Usage
from meshd.node import Node
app = FastAPI()
node = Node(
name=NAME, # Assign a name to this server
app=app, # The Fastapi application to hook into
action_on_conflict="merge" # Default action for conflict management
)
...
# To join to a cluster
await node.join([url]) # Add the joining url
await node.sync_up() # Sync up the data
await asyncio.sleep(...) # Wait a few seconds for the sync up to finish
...
# Fetch current data
internal_data = node.data.to_dict()
Example Code
import socket
import asyncio
import contextlib
from fastapi import FastAPI
from meshd.node import Node
NAME = socket.gethostname()
@contextlib.asynccontextmanager
async def lifespan(app: FastAPI):
# Startup
# Put some data during startup
await node.put_data({f"__node_{NAME.lower()}__": {"name": NAME, ...}})
yield
# Shutdown
# Remove the data during shutdown
await node.pop_data(f"__node_{NAME}__")
await node.sync_up()
await asyncio.sleep(SLEEP)
app = FastAPI(title=f"Test Server {NAME}", lifespan=lifespan)
node = Node(name=NAME, app=app, action_on_conflict="merge")
@app.get("/")
async def root():
internal_data = node.data.to_dict()
return {"name": NAME, "status": "running", "internal_data": internal_data}
@app.get("/join")
async def join(url: str):
await node.join([url])
await node.sync_up()
await asyncio.sleep(SLEEP)
internal_data = node.data.to_dict()
return {"name": NAME, "status": "running", "internal_data": internal_data}
Local Dev Installation
$ /usr/bin/env /usr/bin/python3 -m pip install --break-system-packages -e .
Example Simulation
$ docker compose up
Roadmap
- Basic Mesh communication
- Packaging as a python package
- Documenting the basic usage code
- Hosting the documentation to be visible
- Adding callbacks to data change
- Video illustration of the state synchronization
- Adding auto-instrumentation
- Adding more examples
Metadata
Release files for meshd 2026.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Change of provenance
The repository or configuration that created these release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| meshd-2026.0.3.tar.gz | 34.4 kB | With provenance | Details for meshd-2026.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| meshd-2026.0.3-py3-none-any.whl | Python 3 | none | any | Details for meshd-2026.0.3-py3-none-any.whl |
Total release size: 57.1 kB
Release files / meshd-2026.0.3.tar.gz
Change of provenance
This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
| Download URL | meshd-2026.0.3.tar.gz |
|---|---|
| Size | 34.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b36d86bbb375b8a8a47d7556bdff71415ade24899fedcf3b331644b93f61e7f9
|
|
BLAKE2b-256 checksum How to use checksums |
0e0d19e5149270073b6cd00b89c93ad029fa037a7c4e39b7d6dd070427f62022
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.
Transparency logRelease files / meshd-2026.0.3-py3-none-any.whl
Change of provenance
This file belongs to a release with changed provenance: the repository or configuration that created the release files differ from that of a previous release.
We recommend inspecting the repository and configuration before proceeding. View details.
| Download URL | meshd-2026.0.3-py3-none-any.whl |
|---|---|
| Size | 22.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3cf7ecf2607ce2bcb00855add5eae12889a5ab5d2f1f46ceeee56105e8af8793
|
|
BLAKE2b-256 checksum How to use checksums |
0cd05e9de8241e916a5a65603113c80dd10d583e85afb7502c3909c7d4f5dccd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.
Transparency logSecurity for meshd 2026.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Change of provenance
The repository and configuration that created this release differ from a previous release.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Repository
- Removed 2026.0.2 github.com/arnavdas88/mesh
- Added 2026.0.3 github.com/arnavdas88/meshd
Attestation for meshd-2026.0.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.