Skip to main content

Ypy-websocket

Ypy-websocket is an async WebSocket connector for Ypy.

Build Status Code style: black


Documentation: https://davidbrochart.github.io/ypy-websocket

Source Code: https://github.com/y-crdt/ypy-websocket


Ypy-websocket is a Python library for building WebSocket servers and clients that connect and synchronize shared documents. It can be used to create collaborative web applications.

The following diagram illustrates a typical architecture. The goal is to share a document among several clients.

Each client has an instance of a YDoc, representing their view of a document. A shared document also lives in a room on the server side. Conceptually, a room can be seen as the place where clients collaborate on a document. The WebSocket to which a client connects points to the corresponding room through the endpoint path. In the example below, clients A and B connect to a WebSocket at path room-1, and thus both clients find themselves in a room called room-1. All the YDoc synchronization logic is taken care of by the WebsocketProvider.

Each update to a shared document can be persisted to disk using a store, which can be a file or a database.

flowchart TD
    classDef room1 fill:#f96
    classDef room2 fill:#bbf
    A[Client A<br>room-1]:::room1 <-->|WebSocket<br>Provider| server(WebSocket Server)
    B[Client B<br>room-1]:::room1 <-->|WebSocket<br>Provider| server
    C[Client C<br>room-2]:::room2 <-->|WebSocket<br>Provider| server
    D[Client D<br>room-2]:::room2 <-->|WebSocket<br>Provider| server
    server <--> room1((room-1<br>clients: A, B)):::room1
    server <--> room2((room-2<br>clients: C, D)):::room2
    A <-..-> room1
    B <-..-> room1
    C <-..-> room2
    D <-..-> room2
    room1 ---> store1[(Store)]
    room2 ---> store2[(Store)]

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ypy_websocket-0.12.4.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ypy_websocket-0.12.4-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file ypy_websocket-0.12.4.tar.gz.

File metadata

  • Download URL: ypy_websocket-0.12.4.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for ypy_websocket-0.12.4.tar.gz
Algorithm Hash digest
SHA256 cbbf5fdaa9a301a0b5f9455f1f29478b7c05b62773b2dd2a65c6502b4e10afa1
MD5 998429f83d9be6c24cdbcfbdf58dad91
BLAKE2b-256 68d1a49775fddf5d1e0c967e8dee21d6eee6f88e4280762e6099f0914cf58491

See more details on using hashes here.

File details

Details for the file ypy_websocket-0.12.4-py3-none-any.whl.

File metadata

  • Download URL: ypy_websocket-0.12.4-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for ypy_websocket-0.12.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ff04a206d8d6996ad30aff582dea0a152f933537efa404d1936ec68fffe0e910
MD5 dbed6b2562660278b25b927884a23f30
BLAKE2b-256 3d576dbc4fabc51f47112b4b11a6e9321fac3cfe830ff28b165d740e902a494f

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.12.4 This release

2 files

0.12.3

2 files

0.12.2

2 files

0.12.1

2 files

0.12.0

2 files

0.11.1

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.4

2 files

0.8.3

2 files

0.8.2

2 files

0.8.1

2 files

0.8.0

2 files

0.7.2

2 files

0.7.1

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.9

2 files

0.1.8

2 files

0.1.7

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page