pycrdt-websocket


Namepycrdt-websocket JSON
Version 0.15.1 PyPI version JSON
download
home_pageNone
SummaryWebSocket connector for pycrdt
upload_time2024-10-14 20:36:01
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2022 David Brochart Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords websocket yjs
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pycrdt-websocket

Pycrdt-websocket is an async WebSocket connector for pycrdt.

[![Build Status](https://github.com/jupyter-server/pycrdt-websocket/workflows/CI/badge.svg)](https://github.com/jupyter-server/pycrdt-websocket/actions)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

---

**Documentation**: <a href="https://jupyter-server.github.io/pycrdt-websocket" target="_blank">https://jupyter-server.github.io/pycrdt-websocket</a>

**Source Code**: <a href="https://github.com/jupyter-server/pycrdt-websocket" target="_blank">https://github.com/jupyter-server/pycrdt-websocket</a>

---

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](./reference/Room.md) 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](./reference/WebSocket_provider.md).

Each update to a shared document can be persisted to disk using a [store](./reference/Store.md), which can be a file or a database.
```mermaid
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)]
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pycrdt-websocket",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "websocket, yjs",
    "author": null,
    "author_email": "David Brochart <david.brochart@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/ed/82/db825e871d550a2a99d9f4ca5b6998c1e90e065f0e168818474eabf05500/pycrdt_websocket-0.15.1.tar.gz",
    "platform": null,
    "description": "# Pycrdt-websocket\n\nPycrdt-websocket is an async WebSocket connector for pycrdt.\n\n[![Build Status](https://github.com/jupyter-server/pycrdt-websocket/workflows/CI/badge.svg)](https://github.com/jupyter-server/pycrdt-websocket/actions)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n---\n\n**Documentation**: <a href=\"https://jupyter-server.github.io/pycrdt-websocket\" target=\"_blank\">https://jupyter-server.github.io/pycrdt-websocket</a>\n\n**Source Code**: <a href=\"https://github.com/jupyter-server/pycrdt-websocket\" target=\"_blank\">https://github.com/jupyter-server/pycrdt-websocket</a>\n\n---\n\nPycrdt-websocket is a Python library for building WebSocket servers and clients that connect and synchronize shared documents.\nIt can be used to create collaborative web applications.\n\nThe following diagram illustrates a typical architecture. The goal is to share a document among several clients.\n\nEach client has an instance of a `Doc`, representing their view of a document. A shared document also lives in a [room](./reference/Room.md) 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](./reference/WebSocket_provider.md).\n\nEach update to a shared document can be persisted to disk using a [store](./reference/Store.md), which can be a file or a database.\n```mermaid\nflowchart TD\n    classDef room1 fill:#f96\n    classDef room2 fill:#bbf\n    A[Client A<br>room-1]:::room1 <-->|WebSocket<br>Provider| server(WebSocket Server)\n    B[Client B<br>room-1]:::room1 <-->|WebSocket<br>Provider| server\n    C[Client C<br>room-2]:::room2 <-->|WebSocket<br>Provider| server\n    D[Client D<br>room-2]:::room2 <-->|WebSocket<br>Provider| server\n    server <--> room1((room-1<br>clients: A, B)):::room1\n    server <--> room2((room-2<br>clients: C, D)):::room2\n    A <-..-> room1\n    B <-..-> room1\n    C <-..-> room2\n    D <-..-> room2\n    room1 ---> store1[(Store)]\n    room2 ---> store2[(Store)]\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2022 David Brochart  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "WebSocket connector for pycrdt",
    "version": "0.15.1",
    "project_urls": {
        "Homepage": "https://github.com/jupyter-server/pycrdt-websocket",
        "Issues": "https://github.com/jupyter-server/pycrdt-websocket/issues",
        "Pypi": "https://pypi.org/project/pycrdt-websocket",
        "Source": "https://github.com/jupyter-server/pycrdt-websocket"
    },
    "split_keywords": [
        "websocket",
        " yjs"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "590e63241e1f042a55e1cfdfbb2286593fdfd3699c51182e0544cd64c0bfbceb",
                "md5": "32dd6f28ca8103dab28cf83de1e74f9d",
                "sha256": "4b5c5a7001358b61b14b3ac1c4a13db1d05678f35836e9e5ee829228ce736caf"
            },
            "downloads": -1,
            "filename": "pycrdt_websocket-0.15.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "32dd6f28ca8103dab28cf83de1e74f9d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 20007,
            "upload_time": "2024-10-14T20:35:59",
            "upload_time_iso_8601": "2024-10-14T20:35:59.714192Z",
            "url": "https://files.pythonhosted.org/packages/59/0e/63241e1f042a55e1cfdfbb2286593fdfd3699c51182e0544cd64c0bfbceb/pycrdt_websocket-0.15.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ed82db825e871d550a2a99d9f4ca5b6998c1e90e065f0e168818474eabf05500",
                "md5": "12d7385991ea14eb7f7ca0bbe4e070cf",
                "sha256": "a20b6c6c4926c57176c23bdaee79b064297c50acd251b55f29c7a9ee7068a6c8"
            },
            "downloads": -1,
            "filename": "pycrdt_websocket-0.15.1.tar.gz",
            "has_sig": false,
            "md5_digest": "12d7385991ea14eb7f7ca0bbe4e070cf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 18689,
            "upload_time": "2024-10-14T20:36:01",
            "upload_time_iso_8601": "2024-10-14T20:36:01.306962Z",
            "url": "https://files.pythonhosted.org/packages/ed/82/db825e871d550a2a99d9f4ca5b6998c1e90e065f0e168818474eabf05500/pycrdt_websocket-0.15.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-14 20:36:01",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jupyter-server",
    "github_project": "pycrdt-websocket",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pycrdt-websocket"
}
        
Elapsed time: 0.35910s