Skip to main content

WebSocket connector for pycrdt

Project description

Pycrdt-websocket

Pycrdt-websocket is an async WebSocket connector for pycrdt.

Build Status Code style: black


Documentation: https://y-crdt.github.io/pycrdt-websocket

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


Pycrdt-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 Doc, 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 Doc 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)]

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

pycrdt_websocket-0.16.1.tar.gz (23.3 kB view details)

Uploaded Source

Built Distribution

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

pycrdt_websocket-0.16.1-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file pycrdt_websocket-0.16.1.tar.gz.

File metadata

  • Download URL: pycrdt_websocket-0.16.1.tar.gz
  • Upload date:
  • Size: 23.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pycrdt_websocket-0.16.1.tar.gz
Algorithm Hash digest
SHA256 7738d390943dc1ced5966bc0f9c9ae64f615ee46f8cd35ee9033ef42862741c9
MD5 53afbafd2a02082a2ffdf971e5dfc938
BLAKE2b-256 76e15e43b2620406054c4a9ad94eef32c5aae19d0f432a3b06b73aecf0346353

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycrdt_websocket-0.16.1.tar.gz:

Publisher: publish.yml on y-crdt/pycrdt-websocket

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pycrdt_websocket-0.16.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pycrdt_websocket-0.16.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bd5bbb1195e56af251166c0e6bde3e80cfa6b06b4d8ac6f9b55afb2bc3fa8f1c
MD5 823d099838a060a321b87b83f5b8a6f6
BLAKE2b-256 7296ffaabc9edf0234d2d917929cca1158c1bf78a3183a4ffea7a2000f089c9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pycrdt_websocket-0.16.1-py3-none-any.whl:

Publisher: publish.yml on y-crdt/pycrdt-websocket

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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