Vuer

vuer.rtc

vuer.rtc - CRDT-based real-time collaborative data structures for Vuer.

This module provides a Python implementation of the vuer-rtc TypeScript package, enabling consistent state management across Python and JavaScript clients.

Key Features:

  • CRDT-based conflict resolution (Last-Write-Wins, additive operations)
  • Journal with snapshots for undo/redo and fast replay
  • Vector clocks for causal ordering
  • Compatible with the TypeScript @vuer-ai/vuer-rtc package

Basic Usage: from vuer.rtc import create_graph, Operation

Create a store

store = create_graph( session_id="my-session", on_send=lambda msg: websocket.send(msg.to_dict()), )

Add a node

store.edit(Operation( key="cube-1", otype="node.insert", path="", tag="Mesh", parent_key="scene", )) store.commit()

Modify properties

store.edit(Operation( key="cube-1", otype="vector3.add", path="transform.position", value=[1, 0, 0], )) store.commit()

Get current state

graph = store.graph cube = graph.get_node("cube-1") position = cube.get_property("transform.position")

See https://rtc.vuer.ai for full documentation.

Public imports

These symbols are available from this module. Their definitions are documented in the linked modules.