---
title: "vuer.rtc"
section: "Python API"
order: 14
description: "Python API reference for vuer.rtc"
---

# 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.

- [`create_vector_clock`](/python-api/rtc/types#create_vector_clock) — `vuer.rtc.types.create_vector_clock`
- [`increment_clock`](/python-api/rtc/types#increment_clock) — `vuer.rtc.types.increment_clock`
- [`merge_clocks`](/python-api/rtc/types#merge_clocks) — `vuer.rtc.types.merge_clocks`
- [`compare_clocks`](/python-api/rtc/types#compare_clocks) — `vuer.rtc.types.compare_clocks`
- [`OType`](/python-api/rtc/types#otype) — `vuer.rtc.types.OType`
- [`Operation`](/python-api/rtc/types#operation) — `vuer.rtc.types.Operation`
- [`CRDTMessage`](/python-api/rtc/types#crdtmessage) — `vuer.rtc.types.CRDTMessage`
- [`generate_message_id`](/python-api/rtc/types#generate_message_id) — `vuer.rtc.types.generate_message_id`
- [`generate_uuid`](/python-api/rtc/types#generate_uuid) — `vuer.rtc.types.generate_uuid`
- [`SceneNode`](/python-api/rtc/types#scenenode) — `vuer.rtc.types.SceneNode`
- [`SceneGraph`](/python-api/rtc/scene_store#scenegraph) — `vuer.rtc.scene_store.SceneGraph`
- [`create_empty_graph`](/python-api/rtc/types#create_empty_graph) — `vuer.rtc.types.create_empty_graph`
- [`JournalEntry`](/python-api/rtc/types#journalentry) — `vuer.rtc.types.JournalEntry`
- [`EditBuffer`](/python-api/rtc/types#editbuffer) — `vuer.rtc.types.EditBuffer`
- [`Snapshot`](/python-api/rtc/types#snapshot) — `vuer.rtc.types.Snapshot`
- [`ClientState`](/python-api/rtc/types#clientstate) — `vuer.rtc.types.ClientState`
- [`create_initial_snapshot`](/python-api/rtc/types#create_initial_snapshot) — `vuer.rtc.types.create_initial_snapshot`
- [`create_initial_state`](/python-api/rtc/types#create_initial_state) — `vuer.rtc.types.create_initial_state`
- [`GraphStore`](/python-api/rtc/store#graphstore) — `vuer.rtc.store.GraphStore`
- [`create_graph`](/python-api/rtc/store#create_graph) — `vuer.rtc.store.create_graph`
- [`apply_message`](/python-api/rtc/operations/dispatcher#apply_message) — `vuer.rtc.operations.dispatcher.apply_message`
- [`apply_messages`](/python-api/rtc/operations/dispatcher#apply_messages) — `vuer.rtc.operations.dispatcher.apply_messages`
- [`apply_operation`](/python-api/rtc/operations/dispatcher#apply_operation) — `vuer.rtc.operations.dispatcher.apply_operation`
- [`apply_message_mut`](/python-api/rtc/operations/dispatcher#apply_message_mut) — `vuer.rtc.operations.dispatcher.apply_message_mut`
- [`apply_messages_mut`](/python-api/rtc/operations/dispatcher#apply_messages_mut) — `vuer.rtc.operations.dispatcher.apply_messages_mut`
- [`register_apply_fn`](/python-api/rtc/operations/registry#register_apply_fn) — `vuer.rtc.operations.registry.register_apply_fn`
- [`SceneStore`](/python-api/rtc/scene_store#scenestore) — `vuer.rtc.scene_store.SceneStore`
- [`SubscriptionContext`](/python-api/rtc/scene_store#subscriptioncontext) — `vuer.rtc.scene_store.SubscriptionContext`
