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.0.tar.gz (30.7 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.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.4.0-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.0-cp310-none-win_amd64.whl (450.8 kB view details)

Uploaded CPython 3.10Windows x86-64

y_py-0.4.0-cp310-none-win32.whl (433.6 kB view details)

Uploaded CPython 3.10Windows x86

y_py-0.4.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.4.0-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.0-cp39-none-win_amd64.whl (451.0 kB view details)

Uploaded CPython 3.9Windows x86-64

y_py-0.4.0-cp39-none-win32.whl (433.6 kB view details)

Uploaded CPython 3.9Windows x86

y_py-0.4.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.4.0-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.0-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.0-cp39-cp39-macosx_10_7_x86_64.whl (578.1 kB view details)

Uploaded CPython 3.9macOS 10.7+ x86-64

y_py-0.4.0-cp38-none-win_amd64.whl (450.6 kB view details)

Uploaded CPython 3.8Windows x86-64

y_py-0.4.0-cp38-none-win32.whl (433.2 kB view details)

Uploaded CPython 3.8Windows x86

y_py-0.4.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.4.0-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.0-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.0-cp38-cp38-macosx_10_7_x86_64.whl (577.8 kB view details)

Uploaded CPython 3.8macOS 10.7+ x86-64

y_py-0.4.0-cp37-none-win_amd64.whl (450.6 kB view details)

Uploaded CPython 3.7Windows x86-64

y_py-0.4.0-cp37-none-win32.whl (433.2 kB view details)

Uploaded CPython 3.7Windows x86

y_py-0.4.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.4.0-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.0.tar.gz.

File metadata

  • Download URL: y_py-0.4.0.tar.gz
  • Upload date:
  • Size: 30.7 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.0.tar.gz
Algorithm Hash digest
SHA256 1a1c06b14f5e5b0ca46e8d87909d520b23d69134c90b3f74f985f7317a159fe7
MD5 c22c69401ac6afa5aeb49ae14faaa83c
BLAKE2b-256 3f9cb9fb0d488c943e312e22eb5dee7f472a0ce304ab69a0555088990a935c44

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 30e8688edd31bf1a2305184b7f6ff9e4331e057a83e38d1597880a8c2bf4d925
MD5 50273faa27d8422c0f92ebf15e3a7499
BLAKE2b-256 aaff312ee98186a8ae7d5552635d0db5cd7b9a4fff1334bb20ef17f76b1459f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.0-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 f5f978ce7960230136a2599b53aef80d0561bb88f730bc61eb62e1c1637ef5ac
MD5 1caa130dc92bcb859b94514a0f9888d0
BLAKE2b-256 fa58b15badb77d2c7354f035ed3f153e194aecee0db951ec87e43ea05c128fa7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.0-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 450.8 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.0-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 0c81d9cc318fc805e63d70429af0f703fec81987c85b538726df3d84bfd5289e
MD5 0835f89ee807435b089a1d9c3ac83e82
BLAKE2b-256 0214864fd945e8b006c946c6fc634f4a58a49bdf4d07af4f406b09fa0d9f03e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.0-cp310-none-win32.whl
  • Upload date:
  • Size: 433.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.0-cp310-none-win32.whl
Algorithm Hash digest
SHA256 811431664dca47ef88dc350d6a7231394c5493aad1d47b32a14eb8ae9aa6ee22
MD5 667ed0f8ff5f5bc9143da63c7ad724e8
BLAKE2b-256 9251689c08293ccd3ecc85cede383e2fc44a88aa4a488f5a4a5661dc5e9f82d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 071d467f5003d5fe9b17c719a91dc18b71ca85b3b6b66bb9fdaf6ea55e3149a7
MD5 a9cd02f49b7ca92995631e1e8c8d0d88
BLAKE2b-256 991d37369831d1b0bc226749a1a14bcd632032277f86a09244d4523fd009d078

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 2f27c5b28f1cfeec0e38b236a4ce535c28e749ddcc24bd352eb2f39e2cc58b44
MD5 86382c3b48fe053d23cf5448e2028a0b
BLAKE2b-256 e105a846f1b09b2b0659a03a49c996e57cf100ae47d119d450fca2592501587e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.0-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 451.0 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.0-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 228acd8a2d84bf384fa4af6f438250fd4aad74ac4fc0b10de1f9184d1c98afac
MD5 7797c134d6d7e159ff1004386c2df490
BLAKE2b-256 b6b937f607a00bf1d6e76e9d678dc502b70e7e9562b248acea312b63b28d0692

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.0-cp39-none-win32.whl
  • Upload date:
  • Size: 433.6 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.0-cp39-none-win32.whl
Algorithm Hash digest
SHA256 f6af19444f705ba9b54b9223bb801781db0fbcdbd9223818933aab1287949a8a
MD5 e0b112aaf41d0e79e8a0bae3821a1331
BLAKE2b-256 aac7677bf6e3faf1341bd2ccb4093e509459da8cd356aa7deac3da9106c9a853

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 123ec8911a0f00ef845befcbe8de09c4a90faa11b1f55e0757e079b9b544f89d
MD5 375aa2a836a0f2f151cdbe320795cb03
BLAKE2b-256 d07a93fbf7aeb56d8951336095fe6d1422e6bce7443e7dfcfdcf17bc545f8026

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 36f865ed6a0fb3268765aff7887892ffef03bd428ba67895d2832cf4f5ef31e3
MD5 4a17b3613b164c536b787998a10eea1b
BLAKE2b-256 26e4b5b3c5522fb65f36eb911824b02403db697779e2031445ee5c0c1f0f81f4

See more details on using hashes here.

File details

Details for the file y_py-0.4.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.4.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 cb77a974b9eb956387491ff35279f47c2671317a67f1de61abdb28ef068a49b5
MD5 5a0b367969dd1fa0257709a7b485082d
BLAKE2b-256 cf212a00b4f7271d10dae51886d0ca15f6d19c76ae46c71e236c72d9c7367363

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.0-cp39-cp39-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 578.1 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.0-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 6a8c04d5ae56cde8f5072f754c5c233fcf16b911a5a13976d2d9a9c93a51ec38
MD5 6b9a7152896aa6f53a1da0d0297a6278
BLAKE2b-256 899c6c20e1a4b8e220384ffcfabf8b1f512f8dcdf0f1e4d6548eb9ad61a5f18c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.0-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 450.6 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.0-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 2c250e9770aeb303855def63af3af226d924885fdd2a4a24666f2152c2b42083
MD5 bb0604fa4fe40665a7163b399c8d5407
BLAKE2b-256 9985a34a574782c147345f9cefcd2297c58b13e0828f02cd433c8687c512e427

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.0-cp38-none-win32.whl
  • Upload date:
  • Size: 433.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.0-cp38-none-win32.whl
Algorithm Hash digest
SHA256 995e6251ca54bf3895664a10606170faab15ba278be36b8f3421b820d43fd3be
MD5 bb69bcee90500da9157f788aff4033fb
BLAKE2b-256 118965e9f4b34dd5fb7e7f3de001a6c5a255f1210697161284601f5f42b7c678

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 df644b7445ddc26f442ea2f6743deb54fc95d98f5156dc12fa8374fde9d7eb2d
MD5 29f891060b4a9a515b6d1f1902a280cc
BLAKE2b-256 d250c71c11f9d4a0e9a05af979865f73efab6143141d621f130403278c51c502

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 a3cde35976e3c36536faee2abe621eebf12ffb66b29d0e8f72abdb866ac35c29
MD5 f818c947b8b472e8a5f7520f1e22230e
BLAKE2b-256 0a999e440a93f2489a2149de95dc6e0b54b335a42c2bb622549f5e38ac69d60b

See more details on using hashes here.

File details

Details for the file y_py-0.4.0-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.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 832f5d1b908aa68dd03a875dcd03038c727c232da82549372cfed1e477cd01ad
MD5 ea1a9b7a252e787d2aee39a2a8e80792
BLAKE2b-256 62cc7569cdad339f7b7b760f13288b2df71a557e666e646df6be542be9a94cf9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.0-cp38-cp38-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 577.8 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.0-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 15c0f12020d9e0eb4ef3d7f4d60a54a9d915d8793b1b80c6af8f369bc6832613
MD5 8bf3201d26ace209f59de29aa9dce0ee
BLAKE2b-256 a76e143359f53ca01eadcbc7f7fc89ce1c9d3d8abc9a553e2abfab21c080a2b5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.0-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 450.6 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.0-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 2f2ff7fc2337ea984452390a5da838114f555110fc60ee483371ac2efa0da5f5
MD5 03c24735c49b3019ca79dfe41fdf4649
BLAKE2b-256 90a32f48e1efc2184c52702d56857f2b8714f33279a0637aeae480514b1c31a0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: y_py-0.4.0-cp37-none-win32.whl
  • Upload date:
  • Size: 433.2 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.0-cp37-none-win32.whl
Algorithm Hash digest
SHA256 c41add9b2c6b19b48e25d1e28db989076862c5d660bc91249fb3e66f19653054
MD5 e238361428db1408734700ff0c9ecc9b
BLAKE2b-256 aa632aa1cb00445870da992924e1a591efa22438ec843a9b19adf5536d55529d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c2ca9e05f1fcb0bbd2061ceb2b8bd01d499f2d6616676a0e957f6182dc49cba9
MD5 6c9a7b39224a3c9d4469981d5c5815be
BLAKE2b-256 33dc0aba9e4086e8ef90d1ab4ec2b00181c5f33b9c900bfaea0cf511532215c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for y_py-0.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 c802019ea7ca7a31df9dfabf80d21d7716951ed9aef10d07e8a6ca4d9929269e
MD5 f0da0368394075601d10f72fa3316b0d
BLAKE2b-256 762e12e9bbbce373f9041048db2b16b53c499a731208885abe7542baa82d3b3c

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