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.2.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.2-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.2-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.2-cp310-none-win_amd64.whl (460.6 kB view details)

Uploaded CPython 3.10Windows x86-64

y_py-0.4.2-cp310-none-win32.whl (435.1 kB view details)

Uploaded CPython 3.10Windows x86

y_py-0.4.2-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.2-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.2-cp39-none-win_amd64.whl (460.9 kB view details)

Uploaded CPython 3.9Windows x86-64

y_py-0.4.2-cp39-none-win32.whl (435.1 kB view details)

Uploaded CPython 3.9Windows x86

y_py-0.4.2-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.2-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.2-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.2-cp39-cp39-macosx_10_7_x86_64.whl (588.5 kB view details)

Uploaded CPython 3.9macOS 10.7+ x86-64

y_py-0.4.2-cp38-none-win_amd64.whl (460.4 kB view details)

Uploaded CPython 3.8Windows x86-64

y_py-0.4.2-cp38-none-win32.whl (434.8 kB view details)

Uploaded CPython 3.8Windows x86

y_py-0.4.2-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.2-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.2-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.2-cp38-cp38-macosx_10_7_x86_64.whl (588.2 kB view details)

Uploaded CPython 3.8macOS 10.7+ x86-64

y_py-0.4.2-cp37-none-win_amd64.whl (460.3 kB view details)

Uploaded CPython 3.7Windows x86-64

y_py-0.4.2-cp37-none-win32.whl (434.7 kB view details)

Uploaded CPython 3.7Windows x86

y_py-0.4.2-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.2-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.2.tar.gz.

File metadata

  • Download URL: y_py-0.4.2.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.2.tar.gz
Algorithm Hash digest
SHA256 33f051400a426c2ae7f63e28cdf91a959e6219d4ed5ab905a66a2854f7ece8cc
MD5 cb6ec2adbabc50fb1c61f4b3538a3892
BLAKE2b-256 931e378892cdde5e315e7002bc3414cb6026f655c10899320f63db2b0a074bd2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.2-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 24d6dff119030bffed9cd27e18f3eeadac150ac2474323b89ad8061d8fa825f4
MD5 77e06581d11262e78c9ae620d8197279
BLAKE2b-256 8a272ceab2f168084fac292593949aeec0184636f255c176aa45a734d49cdb76

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.2-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 ba70f9020d6ed4d01ecf0fb00940cc2d0da5568c3b9f55941b5de0ca9997fd42
MD5 2a53251a2ab26294de6196c8b629b73f
BLAKE2b-256 d13fe3193eed191149a71a8f55439e4638005b4869187ba1f16f4b5f4082150f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.2-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 460.6 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.2-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 4b3110da6e76ba0a96e535a0f9e4f83f27b8a9af3630893a3a46107b5265e1f3
MD5 ed3ca6117e133937caa3168b9e5e7f8f
BLAKE2b-256 119fdfa595aeaed5187b36023c03b09239672c771f6d42756e1c6c6609dbf6e7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.2-cp310-none-win32.whl
  • Upload date:
  • Size: 435.1 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.2-cp310-none-win32.whl
Algorithm Hash digest
SHA256 e10a20e8a3a8f87a1d8ba69ca4b07d76c0e86f77587e0ce9e4b0c254c5f430fd
MD5 009ffb321ce212fe974d67fae6f5817a
BLAKE2b-256 0939932a416566506b0dc0f1623549a7c32c4332c9c7d19705790b8598b8a205

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ffa0505f09449b2ff0deddf85b894f9ac926209eb53d63ef538cc68ce7d6250a
MD5 7e9ef137fe8bb6dbb2727e51c2062c86
BLAKE2b-256 22d6fcba07da0fd60dcd632d03f996eb8c9ac9e7239343f870b95965875b1820

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 41e2bf07adbe6aa94df581f153453f11ebe18554f64046086019c00ba47dfee1
MD5 93d670727473734c3fbe457f666d22e4
BLAKE2b-256 dc211822f991b6f1150dcb45e89ec2a43014d39ab9788cf95a6caff5fa7ce81c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.2-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 460.9 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.2-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 2f77a0a7c8216c3c9b1736823c330cee602fb19fc6663b705156a48900566aae
MD5 d064a92fc09d06f00267109958645c5a
BLAKE2b-256 9ac949d2a482fa5c856b7ddc88fcc29810390560219e4b78f757f2046bd3160c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.2-cp39-none-win32.whl
  • Upload date:
  • Size: 435.1 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.2-cp39-none-win32.whl
Algorithm Hash digest
SHA256 e33c27ec4ac3ee5c0ade45da1ab47267c2251ac7e19e4699cfe6c6b18c1238c8
MD5 3781bce009db77f02b5204f1575db712
BLAKE2b-256 f83bcc472b118e64067e879d44a994bf8c180ed3fc54b2eda304445a1b98565e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 4ee1573b4265b9bd4166e69116ba2402e92f5cdbf66af9ad661bd85145d6ea2c
MD5 e98cd84816bcb2beb9f884e71c0c90ab
BLAKE2b-256 4bf67d5fe97a588de1409ed8954c9010f7dc488956df55ad01125261b54904ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 5059284d9a0c2cb4c9d39d85c04e9b7ef55935554f59493bf2d7095bea46459d
MD5 c289b97e5d85205997e9b0d45c10b134
BLAKE2b-256 c2b40fd74fc4a0027828b6ad4aed96935c7a07bc599afacd8c8aa35d59542657

See more details on using hashes here.

File details

Details for the file y_py-0.4.2-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.2-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 c658c4f853a61219d8def5fcf171a3c1755b8b065e2eec2927847c9e6176c849
MD5 761bfa0eed46fe1697f0d100cc385a57
BLAKE2b-256 270b73fb58147c0e022895bbc654ebc855fca974e6e8b30c933b9f58ea3f9972

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.2-cp39-cp39-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 588.5 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.2-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 0cc635380256aed4652d08a4d8b834f01cd11607e537700b719218e371a5755a
MD5 9bd9b226b905b28e715738efb6901855
BLAKE2b-256 b520818393ff51031c3cedfb1ae5f6d738fcbb4f8b06244bfb01eaf5e5abeebc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.2-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 460.4 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.2-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 3ade157195d0866fec967c0a9424a30b5b1b2de71d407e1be5305d59e0ecf960
MD5 93865ee3d7f62354dca51881b225e485
BLAKE2b-256 d7f673f7d4b4b7452212a9e4f83247874100027992758bcb1f1cf7ac780e74ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.2-cp38-none-win32.whl
  • Upload date:
  • Size: 434.8 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.2-cp38-none-win32.whl
Algorithm Hash digest
SHA256 6368444562b67f236ac96081ae24ea1951f95029d067e31f793656ae5d92c82c
MD5 04c625e11177ba5d494d6d0ea067e0da
BLAKE2b-256 9296e5254dfc694b87b06a2cbaab64855701246d56f292d72f9c140c30976bac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1b27186e5645ba7e6d8d726fd05dc68489b995cbd92336f9f7bc76f40596daa9
MD5 4da3b4b488147878189694e4292b315c
BLAKE2b-256 9927db11e1d910b74a5270bf7da687aa0c1c206505a3b28bb6625fdb5fbaa482

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 0d9ab0e827c84487842d82c1122b8c5ccd42e870d4739a33ad8906c249078c9d
MD5 c058e853aac1485eb1c1cea5457b1f62
BLAKE2b-256 05b3476c711ffb5016557d53b87b7f2354ddcdfd0fd4db94daff0445f113517d

See more details on using hashes here.

File details

Details for the file y_py-0.4.2-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.2-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 603b1273e8d9fb89295b663b0c98faeec9fe66c6d03053702dfa206b0e967fe3
MD5 80aca99b8013c4d586d93e04f5e1366e
BLAKE2b-256 c7dec30775ec02d9301ecbf6f3977990665427dc5cd68dee070a3d8010c42967

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.2-cp38-cp38-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 588.2 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.2-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 c5646b04f321358492cef8e6cd8b63a37886f5ea6a38656061e85e57292e272c
MD5 4355a34fe41980a7136f7d53acbf1a8a
BLAKE2b-256 c1ed1814e68d90574bb28aca9f5e534a441b103f6e4a22adb6f1d0ac3cc04454

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.2-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 460.3 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.2-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 d008dfc8f9d0890d6841cba1cd2eca00ad72d8676f960903da35029c613663f0
MD5 2f00785472775b16fccfc8015b297580
BLAKE2b-256 f1c024cce7b1ef720dea5ac8c1bd5492980d8ebd5927943a33a940ae1f900ebd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.2-cp37-none-win32.whl
  • Upload date:
  • Size: 434.7 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.2-cp37-none-win32.whl
Algorithm Hash digest
SHA256 f3d89f42116f24d98aa2751dfb82c7785615064d5c9aa526ea9591b396e878ea
MD5 bf052fb5e1c9d9d46097f2e10d123962
BLAKE2b-256 4783d50dc77b4f36418f432f7b41eb393dfba5c3424e8902a5d8b49ab6b22403

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6ff661cc2d629edee5f1285d572ac39a4a3ba7ac8a23d6ec592c83815ba5315a
MD5 2276c34c2b3b50d07ee405b57e7e7f4c
BLAKE2b-256 71279bf5e0a994777bcd3167fe50695f8ee5c9cb443bea9fda4841e0ca1d3843

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 dc23486e5979c646a855ea2d3965b589781addd9ed665c0a25191df94d7b97f9
MD5 5c8be841dda0bb1b6a9d1a81a0506eea
BLAKE2b-256 54923be6cacb993ce5ddeb7c0a2ccac40844cef6292e75a7e7f0f31567bc91df

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