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.5.0.tar.gz (36.5 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.5.0-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.5.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl (1.5 MB view details)

Uploaded PyPymanylinux: glibc 2.5+ i686

y_py-0.5.0-cp310-none-win_amd64.whl (498.5 kB view details)

Uploaded CPython 3.10Windows x86-64

y_py-0.5.0-cp310-none-win32.whl (462.6 kB view details)

Uploaded CPython 3.10Windows x86

y_py-0.5.0-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.5.0-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.5.0-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.5.0-cp310-cp310-macosx_10_7_x86_64.whl (624.9 kB view details)

Uploaded CPython 3.10macOS 10.7+ x86-64

y_py-0.5.0-cp39-none-win_amd64.whl (498.6 kB view details)

Uploaded CPython 3.9Windows x86-64

y_py-0.5.0-cp39-none-win32.whl (462.7 kB view details)

Uploaded CPython 3.9Windows x86

y_py-0.5.0-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.5.0-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.5.0-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.5.0-cp39-cp39-macosx_10_7_x86_64.whl (624.8 kB view details)

Uploaded CPython 3.9macOS 10.7+ x86-64

y_py-0.5.0-cp38-none-win_amd64.whl (498.0 kB view details)

Uploaded CPython 3.8Windows x86-64

y_py-0.5.0-cp38-none-win32.whl (462.2 kB view details)

Uploaded CPython 3.8Windows x86

y_py-0.5.0-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.5.0-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.5.0-cp37-none-win_amd64.whl (497.9 kB view details)

Uploaded CPython 3.7Windows x86-64

y_py-0.5.0-cp37-none-win32.whl (462.1 kB view details)

Uploaded CPython 3.7Windows x86

y_py-0.5.0-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.5.0-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.5.0-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.5.0-cp37-cp37m-macosx_10_7_x86_64.whl (624.4 kB view details)

Uploaded CPython 3.7mmacOS 10.7+ x86-64

File details

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

File metadata

  • Download URL: y_py-0.5.0.tar.gz
  • Upload date:
  • Size: 36.5 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.5.0.tar.gz
Algorithm Hash digest
SHA256 951b763fc19d0867e35c2b936b6874c982a674a45db9cf086b269cea3e495883
MD5 25a1350a33f15820d34ef63b14dd15ac
BLAKE2b-256 11468d7ba23ccf25673a38c03397b3a3f196ba5d96de668be10c39e45252e3af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.5.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5191fdd7f70a4bad135af24d8e4f2ffddade4a44598a6b1430f6d3b3b6eac3b8
MD5 b1ed967a51fc919d064a46385b2a24dc
BLAKE2b-256 f22c83814c4db21d417c947ff9bf454a9a429bb44f461873810393a4f68abe10

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.5.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 7b7e90abbbdd533523a10d22f03dd7e2fe72c991b9df16e159f049385b05fb95
MD5 0c6a54a8a025f123687ffdafaa4c9c5e
BLAKE2b-256 6a91d4d2fcb3e2d470cd3d29d2863397f63ddf896b431dea3bf9d1e2c6f73628

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.5.0-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 498.5 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.5.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 07b9bb9039157e684f16c47fdaf3d08334874ec97ecc8f3c450dd41d072cde3a
MD5 3bfbd2516f9278d76adbb5f5e10529c6
BLAKE2b-256 83ce17e1809e2a6100765741cfd34f7e90a6a663f17beee119806f70baa57aee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.5.0-cp310-none-win32.whl
  • Upload date:
  • Size: 462.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.5.0-cp310-none-win32.whl
Algorithm Hash digest
SHA256 caa854810c26b9d6717a5fe1a0dc3cda30fc8e05ecbd55e3e593166a992342a1
MD5 9f80c3e5a279590ccb7ad5ab16af3525
BLAKE2b-256 40af9666ad0d3866ff51ab0dd23f15f5466082828b5edb0c5a30cc5c199c319d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.5.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1bb4856453c7b52da020b03de20ea111a5eae3b6b7448a5cef32b910509c72fe
MD5 10b3f69a442a19d7af6ff35bdf7b4bef
BLAKE2b-256 c3e8ab1a5ba7cc4fa75cc322a90c7dd12e3f4165c9053ec09b9ad4351f6ee065

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.5.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 fc25b4c3f9e248353293ab05988525f5e8b8a9c0c8e5228278c2bfa95d30b08d
MD5 d013a5c45ddefae973d2d541a3092ad4
BLAKE2b-256 f0693e5ab6cb678f8eefd0c7c8d482c8a5874d037723a2f53e82a11a6b0d7f0f

See more details on using hashes here.

File details

Details for the file y_py-0.5.0-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.5.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 73746abb0bfb273b807371d0ebffad9c635e601fe691458718e18990bb3a6e6c
MD5 69cb3b4af2f50c4a95d46b3e85836450
BLAKE2b-256 3e1bf684a793a7f589a6d311111855ce10785fc1ee247bfe464892a7594cb85a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.5.0-cp310-cp310-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 dce4f492c6e06c67242241ce27d7864343291fbc6d8ac6b22c5fd062c989e193
MD5 e3396825b4195250eb2996e961d9f252
BLAKE2b-256 a065fe231ce724fee44f854794f9eb44ed1afe89bbad1de2328a3e0c259e804c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.5.0-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 498.6 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.5.0-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 3a87afc7f986367ae5ca46519a88d00858d984e7b049455fd728f2ffba0f03f3
MD5 836b36582395ec8455f3697f0a385049
BLAKE2b-256 6b052df3ddb5de86fca87cd1afe110ea4216f3347adab7cec827d40d765a2c76

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.5.0-cp39-none-win32.whl
  • Upload date:
  • Size: 462.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.5.0-cp39-none-win32.whl
Algorithm Hash digest
SHA256 8dbcdd29f344b5388082a9f548d3f630ba4fc612fa1bf04c40df5e75e57049e4
MD5 25ac93282824e5f47c249bd5e53ce9b8
BLAKE2b-256 b8f83f45301ebb8fca07ebce1fbda770c43aada42bfd6eac5f19ce9fdd74bd69

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5f63278dff66953e56a664d0369d51b092d1b4ca231da0e69d12af131fc82444
MD5 ca52c99a6634388b5c6869f39a556091
BLAKE2b-256 a44c2969210795e919264917c244a1ae49c90aa5c15d1725774ebc65006aed5e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.5.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 a2c7f31f40ba13905798974db44c0930d2f94746513fc225c9ed38e1143b41f7
MD5 5692c6f3a208e1a9b44cd16b261ab467
BLAKE2b-256 179af41c15a7c80f4f60c522232417fef8041c5163bb079e7b03ff6e8bc0248f

See more details on using hashes here.

File details

Details for the file y_py-0.5.0-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.5.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 8c8579fd265b6d8001e3c30c9607e72b9def9b60babc951dec8025eeac97dde6
MD5 d33583eb44ca648ac7c09914ebddac81
BLAKE2b-256 4a5fec214646f64761f3067405bb831a261cf49c99bb93d55657929be777fc76

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.5.0-cp39-cp39-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 624.8 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.5.0-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 66699e79601cbde6133a37691a340b4f613d7fcae3e9b5b4740cb9c203c85177
MD5 ca3e4dd0c3c87b401d95f9ae2f5a2e58
BLAKE2b-256 d0505cc96f7b28ff021fd75e3eb633d8461bbd671abc5ee200820d414f171b6f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.5.0-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 498.0 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.5.0-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 0b4eabbdde0a99e7d029719f225b21a9e12ab57a7635fe3a0c866b18f244c348
MD5 96eec17650b4dc0eda3ec66cfc310452
BLAKE2b-256 3d22021c86e3c51884f041fa314a2e707725bc81f00c915b3d86777876cfb344

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.5.0-cp38-none-win32.whl
  • Upload date:
  • Size: 462.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.5.0-cp38-none-win32.whl
Algorithm Hash digest
SHA256 1e4e60579d8850caf0fe57956007e4463dddd57c12b75555148dea2a80202429
MD5 7204e3f26868afdbc7156fa5621d9542
BLAKE2b-256 92fcf50c8642dca029def1500c41f577ef6ed72f97c5f4f92d97908cfc96ef17

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9e196de2fba239f09d14853004eccb91158306648f5accfe92d8cb9b87e86c7f
MD5 3c3f905fc110ffaa294593a1b400a0da
BLAKE2b-256 d7ee6bba680c91dfd93c02624e3f05476622a9fd5f7b04eb9ad8be5b5f478ff1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.5.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 c25475dad1c9440f76f0932179746a7122eb20d7a8ce9c0897e5ad60abe48796
MD5 f0130aed39546b73adff241dcfff60b4
BLAKE2b-256 783f7b1306862ecbea1f3646504c370001c2e05cf533c88298b351934028b60f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.5.0-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 497.9 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.5.0-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 6d15a5fb0650c17f215303643a6e48ca6411dfb3b01cc442f072b3013b83e7ca
MD5 28f735fc7d7fa2445b7ff8db87aa4e67
BLAKE2b-256 1672c693b338a68f32ef9b7a32d9cbaefe538eccfc20122b2fc36102401569e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.5.0-cp37-none-win32.whl
  • Upload date:
  • Size: 462.1 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.5.0-cp37-none-win32.whl
Algorithm Hash digest
SHA256 bc5a4dfde955bea1456e9e9967d0e2d6c0cb7096b84e64a0d12f0c014c1a558c
MD5 b9b27bdc9c212e1de84063676f9139e0
BLAKE2b-256 22d89005ae49167d6ca462f23b7abbb940a39fecd4ed8768df4bd4e058151a40

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.5.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ff75eb2267a864cddd9088a67c881bc3d2218d435cbf928c05101f867a4e179f
MD5 fb31eb0c63632f347afd26996aa500aa
BLAKE2b-256 15932b84c56fad892cb10dfb887c5613c0a121d4e6017f7de29e171fe87bea16

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.5.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 1817f495bbcc17947575f5cdd57e635b8fee4faa405b5ae1ff02a36ee182d731
MD5 bd946b34da79d491eaafaf6fe30ed408
BLAKE2b-256 e32fa7aa05cd8b912c8f5dcb67c60bad7fd79147bdc3d71e1f5590e16541fba8

See more details on using hashes here.

File details

Details for the file y_py-0.5.0-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.5.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 adae327db74d18066360b41e8fa45c9094f7cae039da4f1f0699913c83e0f6df
MD5 5c87062701411407c9aa004ced4a16ce
BLAKE2b-256 113ca92233d56c9910114b8d69a9efa9e42ff09c3636a7bbc4d9823ec76da5b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.5.0-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 cba5f2da058f4d0f899d0e7900644671e0c00397571acbf2eafc7bb9cfb727b3
MD5 dfe367e6ca0e9e13740c8e72446025c5
BLAKE2b-256 9ac7fba10af199e302fb3f8ca239ecde0783b54e32c40c6c495c02f69f323027

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