Skip to main content

No project description provided

Project description

Y-Py

Y-Py is a Python binding for Y-CRDT. It provides distributed data types that enable real-time collaboration between devices. Y-Py can sync data with any other platform that has a Y-CRDT binding, allowing for seamless cross-domain communication. The library is a thin wrapper around Yrs, taking advantage of the safety and performance of Rust.

Installation

pip install y-py

Getting Started

Y-Py provides many of the same shared data types as Yjs. All objects are shared within a YDoc and get modified within a transaction block.

import y_py as Y

d1 = Y.YDoc()
# Create a new YText object in the YDoc
text = d1.get_text('test')
# Start a transaction in order to update the text
with d1.begin_transaction() as txn:
    # Add text contents
    text.push(txn, "hello world!")

# Create another document
d2 = Y.YDoc()
# Share state with the original document
state_vector = Y.encode_state_vector(d2)
diff = Y.encode_state_as_update(d1, state_vector)
Y.apply_update(d2, diff)

with d2.begin_transaction() as txn: 
    value = d2.get_text('test').to_string(txn)

assert value == "hello world!"

Development Setup

  1. Install Rust Nightly and Python
  2. Install maturin in order to build Y-Py
pip install maturin
  1. Create a development build of the library maturin develop

Tests

All tests are located in /tests. You can run them with pytest.

pytest

Build Y-Py :

Build the library as a wheel and store them in target/wheels :

maturin build

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

y_py-0.2.2.tar.gz (726.3 kB view details)

Uploaded Source

Built Distributions

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

y_py-0.2.2-cp310-none-win_amd64.whl (451.7 kB view details)

Uploaded CPython 3.10Windows x86-64

y_py-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

y_py-0.2.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

y_py-0.2.2-cp310-cp310-macosx_10_9_x86_64.whl (583.4 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

y_py-0.2.2-cp39-none-win_amd64.whl (451.9 kB view details)

Uploaded CPython 3.9Windows x86-64

y_py-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

y_py-0.2.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

y_py-0.2.2-cp39-cp39-macosx_10_9_x86_64.whl (583.4 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

y_py-0.2.2-cp38-none-win_amd64.whl (452.3 kB view details)

Uploaded CPython 3.8Windows x86-64

y_py-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

y_py-0.2.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

y_py-0.2.2-cp38-cp38-macosx_10_9_x86_64.whl (583.4 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

y_py-0.2.2-cp37-none-win_amd64.whl (452.2 kB view details)

Uploaded CPython 3.7Windows x86-64

y_py-0.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

y_py-0.2.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl (1.4 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ i686manylinux: glibc 2.5+ i686

y_py-0.2.2-cp37-cp37m-macosx_10_9_x86_64.whl (583.4 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

Details for the file y_py-0.2.2.tar.gz.

File metadata

  • Download URL: y_py-0.2.2.tar.gz
  • Upload date:
  • Size: 726.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for y_py-0.2.2.tar.gz
Algorithm Hash digest
SHA256 d4df0740713bc60e154df298bc37b8359e6c2dcad61979d1de25064ee1301ee1
MD5 284bf92c2127c0b0a7ee8b8a369b30f0
BLAKE2b-256 f82df48832052e0a1f642141d81e1d1177e06a8b2d50467c7aecc1b9b8e5cc89

See more details on using hashes here.

File details

Details for the file y_py-0.2.2-cp310-none-win_amd64.whl.

File metadata

  • Download URL: y_py-0.2.2-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 451.7 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for y_py-0.2.2-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 94c0d250b869f9f1702dbf9e706bc89eeda261a4775305d814320efcec72b844
MD5 22f1c650214ecbd5712fc8692f43506e
BLAKE2b-256 7105b5dae29a826a1b47d30efa6e9abf670b0e6d5aee0a7c88901f25860b6629

See more details on using hashes here.

File details

Details for the file y_py-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: y_py-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for y_py-0.2.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1cb2c2a1acb099478e117f5445d099938eb4c5bc93f358ce819937f34a524eee
MD5 9d383ccf87fd8885a8aa2f5469b9f574
BLAKE2b-256 11a3b6c79c7bae8226872a7102fb8035180f34ea09f66ce2b52ccaabaa9d07ec

See more details on using hashes here.

File details

Details for the file y_py-0.2.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for y_py-0.2.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 7716788ed2d92750c6a5118d078900ab4fe54b7cb32dde824a0574a78ba6b725
MD5 55b55763024596c69845c09c8476a68c
BLAKE2b-256 dedf1c078cdb99d90f8f1c0fda4003b3939116c7d825a41c8a47541ccc6e6f66

See more details on using hashes here.

File details

Details for the file y_py-0.2.2-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: y_py-0.2.2-cp310-cp310-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 583.4 kB
  • Tags: CPython 3.10, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.27.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/2.7.18

File hashes

Hashes for y_py-0.2.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5f0a4622566fbf1b85d91b47f0497e5e42617cc148872b39c67233c3ff4080aa
MD5 a8268c9e8671b3c876772bbc2a84f99f
BLAKE2b-256 45927a5fb43aad2fe3dd0c438ab99916a22fea6188e16cb83d88d2089928c496

See more details on using hashes here.

File details

Details for the file y_py-0.2.2-cp39-none-win_amd64.whl.

File metadata

  • Download URL: y_py-0.2.2-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 451.9 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for y_py-0.2.2-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 3efce15b4f2a553d1d0564d9beb460b1dd005cbc927fb1ac6534a3e8ba2aea6c
MD5 e361a8b286dc64c1d6f2a1e5361cdb17
BLAKE2b-256 094ede54a01099a36045f4255e29beab44b91e4980b47a7c2968cf4f030f66a7

See more details on using hashes here.

File details

Details for the file y_py-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: y_py-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for y_py-0.2.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d2b0bfa8220ea42cb308eca3bb86d34744e4edb6538f7ea8fb11524fbceca9c9
MD5 e52f2dd52fcdc5e60a1cc6cad07db9c0
BLAKE2b-256 33e3842c46a8bd6b8e88aa9c5481fba2cf6a7e62c79b5d32f37098c42a066ba3

See more details on using hashes here.

File details

Details for the file y_py-0.2.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for y_py-0.2.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 5a7349a13210b693a841ca9d980d286ef2c4dc372790c2396a4259d15608384e
MD5 b10dccf793686e0f05ef63fdf7a80b59
BLAKE2b-256 5f88d65b2b6ddfc009c1076376aa76617216180b9544cf336df34763534c7caa

See more details on using hashes here.

File details

Details for the file y_py-0.2.2-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: y_py-0.2.2-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 583.4 kB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.27.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/2.7.18

File hashes

Hashes for y_py-0.2.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 04f99c192b8cbf0f877829371b900663346dd6996097554e621ce481f8f0c204
MD5 aeb8ce78d3046af18a4c97056c4ac857
BLAKE2b-256 f4f9ae008aa4e5370c05b0c38e9f2bf22d2edef1fcc0ee0b60f82bc405d58a43

See more details on using hashes here.

File details

Details for the file y_py-0.2.2-cp38-none-win_amd64.whl.

File metadata

  • Download URL: y_py-0.2.2-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 452.3 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for y_py-0.2.2-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 d7835fe28a5079ef2834ac9198fb2f89d622d0a10e3a59f0b2023453ae0b530c
MD5 cc705214843221aad89462a21f89f8cf
BLAKE2b-256 fc1d8acc6d068d7dad001d00ae508aa7a1860a67ddde7eb2cbe1d58f2c893ec5

See more details on using hashes here.

File details

Details for the file y_py-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: y_py-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for y_py-0.2.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f2025158333b4166f7dfa1ca29b6c4e47572b9ed6b59de177fd03ffe38bba590
MD5 004cd3cecbfa442611d0ecace47c9928
BLAKE2b-256 b561600e280edae366f28003378203e28c6f31242f8f287b1a807d51f0032446

See more details on using hashes here.

File details

Details for the file y_py-0.2.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for y_py-0.2.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 a0b8fc92a0eac778b9fca0bf5edee5da9081d619446f9e5c7fcdec11d3cc75b3
MD5 a3e5aea7e7efd60842c1e5b8c401a95a
BLAKE2b-256 ab4ab6616de015ed343c51d95fd3c8bc6a88d60505656a99d69b6285a8014166

See more details on using hashes here.

File details

Details for the file y_py-0.2.2-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: y_py-0.2.2-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 583.4 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.27.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/2.7.18

File hashes

Hashes for y_py-0.2.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2ff433f06441ec100338785fbdd6f93870066b00320daf0ac4785bf0a75212fe
MD5 417e0f5df5f1416e24c9ffd6fa905b82
BLAKE2b-256 97ee36e412c8fbb9bd01347dbde48db9e820285b76c141f83b115f5b61903048

See more details on using hashes here.

File details

Details for the file y_py-0.2.2-cp37-none-win_amd64.whl.

File metadata

  • Download URL: y_py-0.2.2-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 452.2 kB
  • Tags: CPython 3.7, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for y_py-0.2.2-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 5d7bcc8286688c12d49ceb4f868763ae82d4b4f06a6e5b1d179b0ca87f15ed64
MD5 ac329e12796846e029282e4c2cbc9d02
BLAKE2b-256 9005b9f04802dd04bd76fbbbfa7e4466e4efca46579f8742ef956071a5e7ca0c

See more details on using hashes here.

File details

Details for the file y_py-0.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: y_py-0.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10

File hashes

Hashes for y_py-0.2.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9bd19f028c5b9e2d53abaf8b94734cffa32cb385c07a2150fbd8fbdf88d72dc8
MD5 17690be2119a5babf4c7d3b501a4b062
BLAKE2b-256 3e053a8c5c260b5c29f2077e546a45ace33ddb36379714af479b7c90dc537b06

See more details on using hashes here.

File details

Details for the file y_py-0.2.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for y_py-0.2.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 3b99805f34a39265268cd1806ea001c6b32ccdbc095cee13474f8567e2a34a97
MD5 78c07c83f345ab9be6a773718c5b22c1
BLAKE2b-256 bb3cc75c80f0477c2619e4200060591639c195a70ac35d2d1e0a38989fb8a753

See more details on using hashes here.

File details

Details for the file y_py-0.2.2-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: y_py-0.2.2-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 583.4 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.2 requests/2.27.1 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/2.7.18

File hashes

Hashes for y_py-0.2.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 280f632bd3c888bf709da8ecd93764463c0ae325b30579b4c4ac8e7fac89d9c9
MD5 629d67e7c5345cb136ed76075d8a489c
BLAKE2b-256 837dbf103907c313593bb12e970de9cf886ce48548c154ceb0dab28c7055ffa0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page