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. 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

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)

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 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.2.3.tar.gz (29.1 kB view details)

Uploaded Source

Built Distributions

y_py-0.2.3-cp310-none-win_amd64.whl (467.9 kB view details)

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

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

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

y_py-0.2.3-cp310-cp310-macosx_10_9_x86_64.whl (606.7 kB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

y_py-0.2.3-cp39-none-win_amd64.whl (468.3 kB view details)

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

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

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

y_py-0.2.3-cp39-cp39-macosx_10_9_x86_64.whl (606.7 kB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

y_py-0.2.3-cp38-none-win_amd64.whl (468.5 kB view details)

Uploaded CPython 3.8 Windows x86-64

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

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

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

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

y_py-0.2.3-cp38-cp38-macosx_10_9_x86_64.whl (606.7 kB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

y_py-0.2.3-cp37-none-win_amd64.whl (468.6 kB view details)

Uploaded CPython 3.7 Windows x86-64

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

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.7m manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

y_py-0.2.3-cp37-cp37m-macosx_10_9_x86_64.whl (606.7 kB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: y_py-0.2.3.tar.gz
  • Upload date:
  • Size: 29.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.12

File hashes

Hashes for y_py-0.2.3.tar.gz
Algorithm Hash digest
SHA256 92701ef4c7bcf2a769e2eaee4be8a5d95c9937725847862f1896a6fcff9f7426
MD5 fbf9f9e91601cdbecb0f426964bd2624
BLAKE2b-256 296c320ae2569a1d9f498f5fb6236be9fbdb4e9cf0b31a4b71b44c2b0b4cfbf1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.2.3-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 467.9 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for y_py-0.2.3-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 8e191062df8aed3f901f19c9298ca85958d4e35441b23d8967b1e3838a2056e1
MD5 8c27d99753511e85e9d0d6a1052a4498
BLAKE2b-256 a9cd866a44a15128573e92d319ff5e715e4ef04c74a6a89b976966274fafcf60

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.2.3-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.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for y_py-0.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7c95d79edcb03a5397589c4aa0d57575ae0a660ee2bb13b086ab18ce84f8c983
MD5 121e3b3fdac4c7117990afe8337256e3
BLAKE2b-256 b65b274f66a9e592b6a7b2d34732f877739a17eb3ed1a42a4a81b7090d7d077a

See more details on using hashes here.

File details

Details for the file y_py-0.2.3-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.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 a2d7dd4ae1478fd0e579bc0706db63e883b6f4dd1d447ce749131863046c6cd9
MD5 815c36d809ac752a34b7e12425bc9e9d
BLAKE2b-256 d320c6074caa243b16d236d2e228efdd0d12af0fb045267c72d97a71bf27da7d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.2.3-cp310-cp310-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 606.7 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.63.0 CPython/2.7.18

File hashes

Hashes for y_py-0.2.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 90514d10d925335437dd61e463bc28e9cedafb79c702ab5792b247ed0453456d
MD5 b0889529dc9e05f6ce939381526079ce
BLAKE2b-256 901ce791ee897884b50acc5d882a45ee5e0add36ba71694d124982ac98b116f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.2.3-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 468.3 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for y_py-0.2.3-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 b1cdee3d367a36cc3916b35c0f2b32267c71cce0889e53e153cd14eaf9ea384b
MD5 95529b9cfcd800939b49a5bcccb1e1dc
BLAKE2b-256 213779c24d9c7408851064c6ba3a432cf95e3b8fe5126f45e0d2774585e5dfd4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.2.3-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.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for y_py-0.2.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 29d752a114d787387c232a9d502d3653526feeec23ad58400ec81334cac01415
MD5 c6446a09198a79a09e535de58721ae5c
BLAKE2b-256 6f30e275764d59769faf85da689fd984a41cb3eba4c76dc59cc5581477059cc4

See more details on using hashes here.

File details

Details for the file y_py-0.2.3-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.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 19c8645d7159b9b7aebb947ea76a416114d64f7d1d18a3b332beda818856d4aa
MD5 edf0197760c4233e41ccd4a8c4a87036
BLAKE2b-256 8c00a1aee01ad612f3458627ca3b9648a0d178a866b8c6e25cfa5cfed2a262ba

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.2.3-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 606.7 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.63.0 CPython/2.7.18

File hashes

Hashes for y_py-0.2.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 551bda44a67c36eb1d48d1b57a12a9c6f40fe6b6a105ff6d68ab8ec8efdcb71f
MD5 a6565530af7a8de90089c8cd90e896f2
BLAKE2b-256 e540f176d6919244b28f601868b96b2c76af07e9716d0e59a93ddc65822cda7a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.2.3-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 468.5 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for y_py-0.2.3-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 95c202561309b4f62d1f27114221f99fc2cabd342b5d185a0f18cd0702711714
MD5 9f465ed9ddde488b6f77e5dd00b8105e
BLAKE2b-256 5a501670388cb8d7b352c9c2ad800315ca7fd707f5ae5994a2bb9cb3f062795a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.2.3-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.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for y_py-0.2.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a45fa6d9a511e0aa2b33e8307010914bd7fab96f1ae3b50a298c673e307d4b4e
MD5 dad7d592a45cad4940fcd990fd0bb8c3
BLAKE2b-256 7a03f6158ba709368484f96c9fd2a61f14abb8de5de77060e1ecf61d487d6579

See more details on using hashes here.

File details

Details for the file y_py-0.2.3-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.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 63a6b77a55dfd28a4a364ad17fa842ece6ee7b177496be8a1b5e1d5d0fec6e7a
MD5 c786450e0447e72747b179dc61013d87
BLAKE2b-256 56cd4ec1d5bc78c1e22589a426dd3ec764ecf93184efe328e5fc79d5f65394c4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.2.3-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 606.7 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.63.0 CPython/2.7.18

File hashes

Hashes for y_py-0.2.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b5b7fa50187ecedb719858a6f27542156a0ea69dff2fce53844ca46ff39f2ff5
MD5 49827b07887efa4ee8567088c411ec84
BLAKE2b-256 fe958400eb65dc2e0720b66b4871364a699edbe3b2743d22a9bed129053e71fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.2.3-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 468.6 kB
  • Tags: CPython 3.7, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for y_py-0.2.3-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 a0d4a3d9d73b6e207c8c87f045f0c16cb6ee13f86d56ddb476f784ca47a6fb43
MD5 bdb8b3ef65f0fba8a4a9645037c20a78
BLAKE2b-256 14dbc41b1bcd569a08d4224d05e6fa3430c4ad91ea8b2ce0c0deadf4433e0e32

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.2.3-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.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.22.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.3 CPython/3.8.10

File hashes

Hashes for y_py-0.2.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 92bb599e1a513802036d87de8997fd69b51b24f0f53bd5da3ce3bf3a222e47fe
MD5 aaa8edea549aeda3a7e0db0adf65def7
BLAKE2b-256 d42ffa9323ce7d348a18335a6f227f09620035973d35b0aa35766a2d0b80f233

See more details on using hashes here.

File details

Details for the file y_py-0.2.3-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.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b13f0d38c66a5e0ab22c8dcba5284ac9483bf813db35f880f89b7c3c9c4923a5
MD5 0f14954822b8ea9394e064bcf1fec164
BLAKE2b-256 2157751a17c8713e73201c7f2b8459a72cb5c6da44c9ea64cc4d58983579ea1b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.2.3-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 606.7 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.63.0 CPython/2.7.18

File hashes

Hashes for y_py-0.2.3-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f7e408083185b7e517fabe48a74c03e695aa417467982ba2580ed81a42e95223
MD5 e1853b5199a979746c7080cb53ff6657
BLAKE2b-256 1e0838e9d12a5fd7e27cf317c683fc5378a8923bdf691d3aea330618d40c8c7d

See more details on using hashes here.

Supported by

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