loro-1.8.2
توضیحات
Python bindings for [Loro](https://loro.dev)
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | loro-1.8.2 |
| نام | loro |
| نسخه کتابخانه | 1.8.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | leon7hao <lz@loro.dev> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/loro/ |
| مجوز | - |
[](https://badge.fury.io/py/loro)
[](LICENSE)
<h1 align="center">loro-py</h1>
<p align="center">
<a aria-label="X" href="https://x.com/loro_dev" target="_blank">
<img alt="" src="https://img.shields.io/badge/Twitter-black?style=for-the-badge&logo=Twitter">
</a>
<a aria-label="Discord-Link" href="https://discord.gg/tUsBSVfqzf" target="_blank">
<img alt="" src="https://img.shields.io/badge/Discord-black?style=for-the-badge&logo=discord">
</a>
</p>
Python bindings for [Loro CRDT](https://github.com/loro-dev/loro). If you have
any issues or suggestions, please feel free to create an issue or join our
[Discord](https://discord.gg/tUsBSVfqzf) community.
## Features
- High-performance CRDT operations with Rust implementation
- Rich data types support: Text, List, Map, Tree, Movable List, Counter
- Python-friendly API design
## Installation
```shell
pip install loro
```
## Quick Start
```python
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!")
# store the `subscription` reference to prevent garbage collection
sub = doc.subscribe_root(lambda e: print(e))
doc.commit()
```
## Development
### Prerequisites
- Python 3.8+
- Rust toolchain
- [maturin](https://github.com/PyO3/maturin)
### Setup Development Environment
1. Clone the repository
```shell
git clone https://github.com/loro-dev/loro-py
cd loro-py
```
2. Install development dependencies and run
```shell
# choose your python venv
pip install maturin
maturin develop
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8 | Python |
نحوه نصب
نصب پکیج whl loro-1.8.2:
pip install loro-1.8.2.whl
نصب پکیج tar.gz loro-1.8.2:
pip install loro-1.8.2.tar.gz