Skip to content

mwildehahn/loro-py

This branch is 25 commits behind loro-dev/loro-py:main.

Repository files navigation

PyPI version License

loro-py

Python bindings for Loro CRDT. If you have any issues or suggestions, please feel free to create an issue or join our Discord community.

Features

  • High-performance CRDT operations with Rust implementation
  • Rich data types support: Text, List, Map, Tree, Movable List, Counter
  • Python-friendly API design (WIP)

Installation

pip install loro==1.2.5b1

Quick Start

from loro import LoroDoc

# Create a new document
doc = LoroDoc()
# Get a text container
text = doc.get_text("text")
# Insert text
text.insert(0, "Hello, Loro!")
doc.subscribe(lambda e: print(e))
doc.commit()

Development

Prerequisites

  • Python 3.8+
  • Rust toolchain
  • maturin

Setup Development Environment

  1. Clone the repository
git clone https://github.com/loro-dev/loro-py
cd loro-py
  1. Install development dependencies and run
# choose your python venv
pip install maturin
maturin develop

About

Python bindings for Loro CRDTs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 68.7%
  • Python 31.3%