Skip to main content

No project description provided

Project description

Ypy

Ypy is a Python binding for Y-CRDT. It provides distributed data types that enable real-time collaboration between devices. Ypy 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.

🧪 Project is still experimental. Expect the API to change before a version 1.0 stable release.

Installation

pip install y-py

Getting Started

Ypy 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)

value = str(d2.get_text('test'))

assert value == "hello world!"

Development Setup

  1. Install Rust Nightly and Python
  2. Install maturin in order to build Ypy
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 Ypy :

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.4.6.tar.gz (31.4 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.4.6-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.4 MB view details)

Uploaded PyPymanylinux: glibc 2.5+ x86-64

y_py-0.4.6-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl (1.5 MB view details)

Uploaded PyPymanylinux: glibc 2.5+ i686

y_py-0.4.6-cp310-none-win_amd64.whl (467.3 kB view details)

Uploaded CPython 3.10Windows x86-64

y_py-0.4.6-cp310-none-win32.whl (442.6 kB view details)

Uploaded CPython 3.10Windows x86

y_py-0.4.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.5+ x86-64

y_py-0.4.6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl (1.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.5+ i686

y_py-0.4.6-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (1.2 MB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)macOS 10.9+ x86-64macOS 11.0+ ARM64

y_py-0.4.6-cp310-cp310-macosx_10_7_x86_64.whl (597.3 kB view details)

Uploaded CPython 3.10macOS 10.7+ x86-64

y_py-0.4.6-cp39-none-win_amd64.whl (467.5 kB view details)

Uploaded CPython 3.9Windows x86-64

y_py-0.4.6-cp39-none-win32.whl (442.7 kB view details)

Uploaded CPython 3.9Windows x86

y_py-0.4.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.5+ x86-64

y_py-0.4.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl (1.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.5+ i686

y_py-0.4.6-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (1.2 MB view details)

Uploaded CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)macOS 10.9+ x86-64macOS 11.0+ ARM64

y_py-0.4.6-cp39-cp39-macosx_10_7_x86_64.whl (597.3 kB view details)

Uploaded CPython 3.9macOS 10.7+ x86-64

y_py-0.4.6-cp38-none-win_amd64.whl (466.8 kB view details)

Uploaded CPython 3.8Windows x86-64

y_py-0.4.6-cp38-none-win32.whl (442.2 kB view details)

Uploaded CPython 3.8Windows x86

y_py-0.4.6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.5+ x86-64

y_py-0.4.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl (1.5 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.5+ i686

y_py-0.4.6-cp37-none-win_amd64.whl (466.8 kB view details)

Uploaded CPython 3.7Windows x86-64

y_py-0.4.6-cp37-none-win32.whl (441.9 kB view details)

Uploaded CPython 3.7Windows x86

y_py-0.4.6-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.5+ x86-64

y_py-0.4.6-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl (1.5 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.5+ i686

y_py-0.4.6-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (1.2 MB view details)

Uploaded CPython 3.7mmacOS 10.9+ universal2 (ARM64, x86-64)macOS 10.9+ x86-64macOS 11.0+ ARM64

y_py-0.4.6-cp37-cp37m-macosx_10_7_x86_64.whl (596.5 kB view details)

Uploaded CPython 3.7mmacOS 10.7+ x86-64

File details

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

File metadata

  • Download URL: y_py-0.4.6.tar.gz
  • Upload date:
  • Size: 31.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for y_py-0.4.6.tar.gz
Algorithm Hash digest
SHA256 b11c9e6e0e08446e3b5bfd345dc206d0201991f6ae7677ccf5c4b8c6b1211544
MD5 dc29a25c43a2da7a36dd0f1d5770ed30
BLAKE2b-256 f4203ef8ac4e660b9849f5942452d03e4366f829a560d43fb31f01aa84295f07

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for y_py-0.4.6-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 21d8ac7f2dda444499e9bd2df747f179515367ae2e960445128ce0361bc97d6c
MD5 74e99fcde80e8c284baf3012811b202c
BLAKE2b-256 a8a57ab88135f4c59827c7fdbfdbaa8de2fbc2f3ada9c4296742ddaa11c08a26

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for y_py-0.4.6-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 32490ddd2f40e3cf2ba68302a222601d7e67c1f2f89675c392c57b514eaacea5
MD5 7d48858c71f3706b81713580855f1ee2
BLAKE2b-256 fe3946ba0545f21c19c427cf8216d7da1a3617e62b8bc530abbd569fbdd9d159

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.6-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 467.3 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for y_py-0.4.6-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 e54e9fc6fa86ace04cbbcf1af598f32c8b27c5709bd33d36c05aadf6ef8c8905
MD5 01815178edcc75f92aaa2f0f7b85bd7c
BLAKE2b-256 88033872066843856ab92704949640b6fb0012aace625fe868fb464e1ef89c11

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-cp310-none-win32.whl.

File metadata

  • Download URL: y_py-0.4.6-cp310-none-win32.whl
  • Upload date:
  • Size: 442.6 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for y_py-0.4.6-cp310-none-win32.whl
Algorithm Hash digest
SHA256 d7ef1a868e73833a776345e8dc6659fd38fa07e5b9017b5b06cfabb97a1bae66
MD5 7272139c5ebe0a72d577f31fe49efcff
BLAKE2b-256 48d1bd3fb60db922ebba1b4846026c83c4b0081d0ff2d99ac3c16ec38c74b19b

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for y_py-0.4.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 2f99bb8f93aa87160b14d51a8301c7053baf5b7db855f95df4d6ae75a711a8c3
MD5 583b73339710ff1df594f67e04a69e8c
BLAKE2b-256 91138809163d335282c481583d9e06e5beab8b8f69bac642a40bb4623eb8d0e1

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for y_py-0.4.6-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 2a7dc6093236ad84c8ae190881f24348f2f3d5fb04bd539896f454e4b6c5ffb3
MD5 84066a601c40c94659c429e5f8c2f67d
BLAKE2b-256 371a903991f3c1c3068c9c491c9d1965ed9d2bfe19f689bd7d9adbea83cd4e81

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for y_py-0.4.6-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 28350708bd9a424a9c71b95a8449f599096516c2901d23b47f96391fdb5eacf5
MD5 133c466343e7a44485608439adfa55f9
BLAKE2b-256 be02a5dff7973bd45c78b2e2f97c0ec7aab3f5c8d4ee4282af5ae90bdf6dd954

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-cp310-cp310-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for y_py-0.4.6-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 7f17d858d01883acc98fe75998e0e3396203de8eda8fe6d3b1d3dd079d0109b8
MD5 e370ea97941b544dd590d3507e556e3a
BLAKE2b-256 57147becf936d13e7e85761215e1c74bd5af3a6d060b81b3a20a63c7df834dbb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.6-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 467.5 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for y_py-0.4.6-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 6afe04270c69da0142b784351bbb5963369fb6ea75c84158396b5d5e76a1ce36
MD5 539fa547640660f13bdaa5dc84ad1ad5
BLAKE2b-256 c70098a82da0a5f97fb2732f1e54d0812313ea872bd4a8c2a46b29f1458b5d7d

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-cp39-none-win32.whl.

File metadata

  • Download URL: y_py-0.4.6-cp39-none-win32.whl
  • Upload date:
  • Size: 442.7 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for y_py-0.4.6-cp39-none-win32.whl
Algorithm Hash digest
SHA256 146040afd2a31e10a4332ec7eff41d00abb89578a8eb1204cbe1fbaf950b37bf
MD5 224346715e19a0a954314c70f5f127f6
BLAKE2b-256 a4691b78119f3d23ee0f612c84748c65cb4bd7740bdb38f56dfbb105e7e0427f

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for y_py-0.4.6-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a453360c0dae9fcd19da156054ecb21311c8c981add5247b6d6791fad45d0c85
MD5 47067d938ba34a3b8ab8f676dc5d2bc6
BLAKE2b-256 1ee9e1760646e1fa5ba6256416293a86c8e458a7b0a3c5bb0a3abf6b5a8f5a64

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for y_py-0.4.6-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 79976f5d05c6f9628e7615d6706cd421f4cf471c08c4b5709797f6fc3bc724d8
MD5 b5def372f14aefb60ff385580abb4c0e
BLAKE2b-256 2464eef76bd5883e70367e6fc31a9d016d67fef045f52f6f259ed81516acbc7e

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for y_py-0.4.6-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 01506dd74fb7319e01c808d6e7d70c2e42ca4071302a1d839d1f7425a13c3a2e
MD5 b2e54a6d1d09b301ffdba2021cc5ffca
BLAKE2b-256 fc569ed060a8e92e60e5dd7da310a209f1f0ffc7e5edb093c5953018670dab2d

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-cp39-cp39-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: y_py-0.4.6-cp39-cp39-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 597.3 kB
  • Tags: CPython 3.9, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for y_py-0.4.6-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 616761a92570d8d487bbb14e99adf1d8af45565589f0db63318d3e29c86a9b0e
MD5 5a635076c5689297ae8b9bb9f7df7cd2
BLAKE2b-256 e3fedf11b5a5ad61c2e79246a2e478c1a27884e9be05bb84577c29af50b4b9be

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.6-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 466.8 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for y_py-0.4.6-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 79d95e898d02768300843a6a79c694565d9a953b5c47cb2d6b71450913a471f4
MD5 c59675bec1f2eec76037aa55f3953946
BLAKE2b-256 38c3dc44a432a46a20938087842e07fdfd28a956cb196db5e4966023c76fe945

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-cp38-none-win32.whl.

File metadata

  • Download URL: y_py-0.4.6-cp38-none-win32.whl
  • Upload date:
  • Size: 442.2 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for y_py-0.4.6-cp38-none-win32.whl
Algorithm Hash digest
SHA256 2f30a93a5e0ec96798608872b9c954577563dde0eb93ee72fc4c71bedc028aff
MD5 60b1383d16407271794822b947491221
BLAKE2b-256 b49f6a59622c4c9f904096864df426cf0bd5df3eac7979818a13ae82e364152c

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for y_py-0.4.6-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 787e4318f345e9926f4628f965f10c2a7ff88c8422d7aa7e250a78f506984bae
MD5 7064da976f34829b3538d6aee4e75c55
BLAKE2b-256 ff5788ed6287dd758a22f8af25546ad68a6d63997d64af7325e67732bd91e233

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for y_py-0.4.6-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 bfaaefe0887a308d9f749dff623ece7c5275622acced8df1a2c897b6458aabf2
MD5 a3ffdb85a24ec26e9439b655cce3bda2
BLAKE2b-256 e162fb30e7f384f364077e6232e77a714a83070dd07330e0177f7dc7d39c0f5f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.6-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 466.8 kB
  • Tags: CPython 3.7, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for y_py-0.4.6-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 72c797b058c3cd6d35e37dab6b4bae61bf187124c5bd6b69489c32ca1d9c12e3
MD5 7968b6a857e55a9a4464371fca536364
BLAKE2b-256 57be32eaa8d48e1e6776dc34ecc7614c8f73ca6c0fc1046fd95d5cda80d1d3cd

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-cp37-none-win32.whl.

File metadata

  • Download URL: y_py-0.4.6-cp37-none-win32.whl
  • Upload date:
  • Size: 441.9 kB
  • Tags: CPython 3.7, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for y_py-0.4.6-cp37-none-win32.whl
Algorithm Hash digest
SHA256 5cff3819a2b2220c9c2318a476d68c45d8abe13a3aa9a421a571ad6bf89fd5d6
MD5 7cdb14ec05f227b0627027a29a2cc8ca
BLAKE2b-256 82f69197f865713701bfe11be5ea07e9fa7ebd854047055aafb81d5d316417fb

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for y_py-0.4.6-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 007698afc0f4f71b007139b9aa800fdb831be1a3a330d7c4cf1b37c6241d4bcd
MD5 a900403ec901d305a2747f2fdbfe4c0b
BLAKE2b-256 22bc117d8f5f257639ac276f3039dc371176b066516e5a15d2acee974a93be1b

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for y_py-0.4.6-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 0ebe7ec7023a1877cc5790c95b5ba1229892c2c3e66bc681617015331ed78a98
MD5 95411f922f9dabe004bc362cb6e54f8f
BLAKE2b-256 5086c41e4d3896cdf9d86e7b5c5fe0aabe02adbb5c73da484da76028883eb7dc

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for y_py-0.4.6-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 47e9251d7fa025f3bf9b76d856c23a63aaa91989bd24f47345bbc64db0d4d1f1
MD5 cccd142ee69adfa7a9fabe0e3ff9bc40
BLAKE2b-256 ba4e2ab3a89772f9df970b8b89c99f05dda3191cd1fb159d43334d65ce5995bd

See more details on using hashes here.

File details

Details for the file y_py-0.4.6-cp37-cp37m-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for y_py-0.4.6-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 320634156439034d964f2bc46dd7854edd01c4b0b9dc7aba178788c7626a263a
MD5 6db4583b8e9be0283867ffed7934a940
BLAKE2b-256 e72a3217655b23bc72ba0f5c2d4e58a9f46a3910ecfda873810d812de861747f

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