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.3.tar.gz (30.8 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.3-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.3-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl (1.4 MB view details)

Uploaded PyPymanylinux: glibc 2.5+ i686

y_py-0.4.3-cp310-none-win_amd64.whl (461.1 kB view details)

Uploaded CPython 3.10Windows x86-64

y_py-0.4.3-cp310-none-win32.whl (431.6 kB view details)

Uploaded CPython 3.10Windows x86

y_py-0.4.3-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.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl (1.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.5+ i686

y_py-0.4.3-cp39-none-win_amd64.whl (461.4 kB view details)

Uploaded CPython 3.9Windows x86-64

y_py-0.4.3-cp39-none-win32.whl (431.7 kB view details)

Uploaded CPython 3.9Windows x86

y_py-0.4.3-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.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl (1.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.5+ i686

y_py-0.4.3-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (1.1 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.3-cp39-cp39-macosx_10_7_x86_64.whl (587.8 kB view details)

Uploaded CPython 3.9macOS 10.7+ x86-64

y_py-0.4.3-cp38-none-win_amd64.whl (460.9 kB view details)

Uploaded CPython 3.8Windows x86-64

y_py-0.4.3-cp38-none-win32.whl (431.2 kB view details)

Uploaded CPython 3.8Windows x86

y_py-0.4.3-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.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl (1.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.5+ i686

y_py-0.4.3-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (1.1 MB view details)

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

y_py-0.4.3-cp38-cp38-macosx_10_7_x86_64.whl (587.3 kB view details)

Uploaded CPython 3.8macOS 10.7+ x86-64

y_py-0.4.3-cp37-none-win_amd64.whl (460.7 kB view details)

Uploaded CPython 3.7Windows x86-64

y_py-0.4.3-cp37-none-win32.whl (431.0 kB view details)

Uploaded CPython 3.7Windows x86

y_py-0.4.3-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.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl (1.4 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.5+ i686

File details

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

File metadata

  • Download URL: y_py-0.4.3.tar.gz
  • Upload date:
  • Size: 30.8 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.3.tar.gz
Algorithm Hash digest
SHA256 b0130cae26ad36d78abeb2440cafa03af599852bafd89145247ff486150317f1
MD5 61f392d39d9e71d84602cae9d3e51576
BLAKE2b-256 8b6e401ac831c3655a71cfa42f4062e4673b0a58f0c1c343e96ea5f62ccd9aca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.3-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 64b5d506400d0b4465168eabba66b0d5307999eeb02fa0516294d6d34b676b5f
MD5 994af88fce562ba5f99b4b8e66a3de63
BLAKE2b-256 1ab5b9081b7410d4d913a0f08e4900b4728f8e246c25ed4df6d143a2a2ca1651

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.3-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 28025702525226c93e956f980bf8830b7d5d457eeeed95c73506feda601211ff
MD5 1ac5b02488c4b44e24c6e0e1b590616a
BLAKE2b-256 8ff20aa1a05bdfbac8f1befce6367fc7223971d6de0ebae36d7f6ce0abab2097

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.3-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 461.1 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.3-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 0db757215e9e494aa21eefd7ba45e67b4d3b13df5b844f85829ce08e3eec9137
MD5 53d82103b8f8d8543b82993e5f74eeab
BLAKE2b-256 80240bd2f6ffb35897f46cedc8e9d71d3b60f4e1295ebcbe103914fae67a4e35

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.3-cp310-none-win32.whl
  • Upload date:
  • Size: 431.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.3-cp310-none-win32.whl
Algorithm Hash digest
SHA256 f88be15f1608407f12630e358e8fe3b90e773b94542da8a0ff2ab51214812be5
MD5 653ea83628806d6a507c032b98efe4d7
BLAKE2b-256 7fe7ba481482adbc180dbd9cc637ca4d911264df38ac060680cafc1a9e7bce0c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 5710b87c1493ccc71154334ead83dbb8dd9fa51d63f3c0ab1f40f614b269fe68
MD5 f88acc0e0f9dc3dd02814a813f8fea21
BLAKE2b-256 e8c5242aacba0384a2f8c7eba1a8b10f1ba3b53c70af5d90e9cd2d385d26e0d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 e0850d6fceb032fe0d95753c67c843c468f0d8244bda3c170c2b2e82e3d2437f
MD5 9693c6cc338875994cc5b500bf57e0e8
BLAKE2b-256 238bea3d252609472026f3a967e23d3f71384d52b5e6a8163776eb82929a54a2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.3-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 461.4 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.3-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 fb159cd9fe82ab2964a550cf253ccf79be23494f3a1b22d74c341d4e0271fa8b
MD5 cfb534eb303bfe7c4a3d2faac271988a
BLAKE2b-256 269d0249961702e0a25c0d611e661c1db255ca3d3879d8657954861c436fb9ea

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.3-cp39-none-win32.whl
  • Upload date:
  • Size: 431.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.3-cp39-none-win32.whl
Algorithm Hash digest
SHA256 6e915330be2ba3004e6089d007607a6ae662156aa655d08295205efa575c06e6
MD5 88741e25b193acfb9be9c1ac44d9c1e7
BLAKE2b-256 5b2971e9eddad503b6f35de422e4f42417c1846bc5812d65789a8d54f0c9a6af

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f2b01c828e17e71e2d60b4e5ba2d1cc04ae2e3d3a2a2e4c04964529313ccee77
MD5 76eff3cd6e44fc8a6deffe94844bc791
BLAKE2b-256 30bf3921aaa849a97e97e9a24350c2635df485b2e9a600c830c51f3794205dc2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 31796ae3d0cae323d6a6e6b6b03b333796fb35a7fd1f0f52811b8edd87cbd6e6
MD5 cb90b24ba2f3c8740ec521f647e30e23
BLAKE2b-256 4b376537e8988bdcfcdbf5e49bbc97f84fb5baf6e3e2087d70c65511311d762e

See more details on using hashes here.

File details

Details for the file y_py-0.4.3-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.3-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 9e31d9344796f4c71eae5b7241712ef44514ddf9aef83addb0effc3fb8500340
MD5 02386cbc1fdbbc6836d561010f8f549a
BLAKE2b-256 2d5444294643e504cd0be89a50808f9e97abe3376d3788f74eeff2496d16aa9a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.3-cp39-cp39-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 587.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.4.3-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 60fae16ecee074393f3853f0106a539b26a62788e02eb0366dd0236e4a88f5a7
MD5 5e4d5506652f84cdb0fc730df990b5e9
BLAKE2b-256 4c4227d215ca5bd4b4d9546ffcacd6b1f2d6eb66150f9b6be14023c0fa759166

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.3-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 460.9 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.3-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 7e06ecb2273c804ea0bee2bd59c97d399519348feb6282981c2ebef450e8976b
MD5 8288773682f252fd0a8a91c5f97eb074
BLAKE2b-256 39e27d63e78ab341b716ad2a5697f2b108cbc2945bd73d21dbfe29dd892b36f3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.3-cp38-none-win32.whl
  • Upload date:
  • Size: 431.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.3-cp38-none-win32.whl
Algorithm Hash digest
SHA256 8e663ec992782899fa80627235e23b28782643bc28bcc3e4dcceaa9a46896afc
MD5 d6ffbdd36b8655c60fe7578fe15a140e
BLAKE2b-256 558c9d1f7ced2d59efb047a89c162661ab3e785dcdbf99de7c3a4b19cfb4984f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8f405d99bece8e0f3886258d03efcf3262a480409438a58eb3fb0240060f8932
MD5 e962fc08f074d9b02b91f462af314e12
BLAKE2b-256 51d1653d0f5b4d5d8e32cf2d47fcdb716c12b8f8cdbf4ae97ca2084cb976fded

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 aa9f533c0043e5cf0f5b59f4c81dff0f6e216c2981f0c7c4a791dc0a07ef7814
MD5 1cbc185521a2548f2d01c875e641a1a2
BLAKE2b-256 e72b7bcdecc0014e6940f7d4dc4cb5d3fa95c5998afc20aa34686ed3b5813565

See more details on using hashes here.

File details

Details for the file y_py-0.4.3-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for y_py-0.4.3-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 1d265a732b8fc38fba599e92a56c13fc25e431242f56615c6ef1249c09f5a1b9
MD5 5a94c5b0031d05c2a38d073f88e413de
BLAKE2b-256 973df2960d83c9e08dc2d364b9793cada058896e9c724f9b0adc5356f6cc173b

See more details on using hashes here.

File details

Details for the file y_py-0.4.3-cp38-cp38-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: y_py-0.4.3-cp38-cp38-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 587.3 kB
  • Tags: CPython 3.8, 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.3-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 3619b0674637ec892d0a91c1f202811cd7b883494248457471b120e818ce7926
MD5 e0ec6ff84ce163e6852ce0ecb20a5f84
BLAKE2b-256 702bb2f4f7894bc39fae74db1f348c526f71cd40fd414a305daeaba63ccc540f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.3-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 460.7 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.3-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 8378c77f33daa65f897320a79a7e7e9100ef2ec3f89b28e02c631b71dfb9acaa
MD5 985de331ffe3c9ad24c7ba159b1fa5b1
BLAKE2b-256 201c554d274770b970567a05473808438a5f04c4358f41326c387513cd06b12e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.3-cp37-none-win32.whl
  • Upload date:
  • Size: 431.0 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.3-cp37-none-win32.whl
Algorithm Hash digest
SHA256 6d1613902f78ef6b45dfe65adecb22b9e0fcb3271ba122e9e55d2aa8d76721f9
MD5 c1c835b1c387c8fcd4a07a2f34b659aa
BLAKE2b-256 6042de3ffb3efea32e3d0d24fd9aff5c48c1e262b9f0be7b1b154271e3780aac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.3-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 af2c695d1fff155403860380ad42f62abf477249fac3365a01b041bc25c6a88b
MD5 4c4b803478856736421a618604e5bf7d
BLAKE2b-256 99df0c89dde008a1c39e6d082a65cb4a8b4c93c672c3e472317e98d6c48971e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 a460196c0da05b7f130869662e7f3fa4f3ec930d70c12fba18339ce3b5d6acab
MD5 642a57639288eff364cd9ce245ab8f2a
BLAKE2b-256 8dea23bd087c7cde3835dcaa0ae2eaade669812b767587ea44ec42a29e230b99

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