Skip to main content

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

nexus_crdt-0.1.0.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

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

nexus_crdt-0.1.0-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

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

Hashes for nexus_crdt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 35fb655b1df01f101916d419b3073f7210f9bcef5e572ebcf2e11e22e3f444a5
MD5 2b5dbce3dd27576244196ab257bcbec9
BLAKE2b-256 d8626190764728559cff512f0049edb5fc704861510a46318c866778723184b2

See more details on using hashes here.

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

Hashes for nexus_crdt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 626abfd9040875a4f0e1aec1143b378739ad4b55d05fdc6727ceb772842be7d3
MD5 5a388601169788dfddd1242ca4f96584
BLAKE2b-256 967b6da2346eefef940f6c76ffd9e15e6e6fb0cff70b9ce5528b745b8cf48b20

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 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