nexus-crdt (Python)
Nexus — leaderless CRDT state synchronization for Python ≥ 3.10. Pure
standard library: __slots__ everywhere, full typing (TypedDict, Protocol),
pickle-able state, and asyncio helpers for I/O-bound sync.
pip install nexus-crdt
from nexus import NexusMap
m = NexusMap("server-1")
m.set("title", "Hello")
m.or_set("tags").add("crdt")
m.text("doc").insert(0, "hello")
m.merge(remote_frame) # bytes — converges; simultaneous writes never raise
m.encode() # canonical TLV frame (byte-compatible with JS/PHP)
m.merkle_root() # SHA-256 Merkle digest of the op history
asyncio
from nexus import NexusMap, async_merge, serve_state, fetch_state
await async_merge(m, ws.recv()) # merge without blocking the loop
server, port = await serve_state(m) # tiny length-prefixed TCP relay
frame = await fetch_state("127.0.0.1", port, m.encode())
pickling
pickle.dumps(m) captures the whole state (canonical frame + actor) and is
safe across processes/versions of the app.
Tests: pip install -e ".[test]" pytest-asyncio && pytest (pytest +
hypothesis fuzzing + shared cross-language vectors).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nexus_crdt-0.1.0.tar.gz.
File metadata
- Download URL: nexus_crdt-0.1.0.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35fb655b1df01f101916d419b3073f7210f9bcef5e572ebcf2e11e22e3f444a5
|
|
| MD5 |
2b5dbce3dd27576244196ab257bcbec9
|
|
| BLAKE2b-256 |
d8626190764728559cff512f0049edb5fc704861510a46318c866778723184b2
|
File details
Details for the file nexus_crdt-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nexus_crdt-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
626abfd9040875a4f0e1aec1143b378739ad4b55d05fdc6727ceb772842be7d3
|
|
| MD5 |
5a388601169788dfddd1242ca4f96584
|
|
| BLAKE2b-256 |
967b6da2346eefef940f6c76ffd9e15e6e6fb0cff70b9ce5528b745b8cf48b20
|