replit-river


Namereplit-river JSON
Version 0.1.9 PyPI version JSON
download
home_pageNone
SummaryReplit river toolkit for Python
upload_time2024-04-25 06:52:00
maintainerNone
docs_urlNone
authorReplit
requires_python<4.0,>=3.11
licenseLICENSE
keywords rpc websockets
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # River

Machinery for compatibility with <https://github.com/replit/river>, the protocol behind the Workspace ↔ pid2 WebSocket (and in general, the protocol behind the Workspace ↔ * WebSocket).

Since the pid2 services are declared in TypeScript using [TypeBox](https://github.com/sinclairzx81/typebox/) in the main repl-it-web repository, and it would be terrible for everyone involved to force folks to follow this paradigm of declaring their services, types, and interfaces in a foreign repository, any other River servers will use gRPC for their protocol definition and implementation. The [`@replit/river-codegen`](https://www.npmjs.com/package/@replit/river-codegen) package can be used to compile the gRPC `.proto` files into a River-compatible TypeBox declaration that can be then packaged into an npm package that can be imported by the Workspace and consumed ergonomically.

This includes the necessary machinery to act as a client or server for River:

* As a River server, create a WebSocket server and the gRPC -> Python River codegen (similar to the protoc flow that generates the Python bindings).
* As a River client, create a WebSocket client and the JSON Schema -> Python River codegen.
  `python -m river.codegen client --output pkgs/river/river/schema.py --client-name Pid2Client pkgs/river/schema.json`
* If we need to create the client-side of a Python gRPC River server, we also need to generate the JSON schema from the .proto file, with this command:
  `python -m river.codegen server-schema --output pkgs/river/river/schema.py  pkgs/river/tests/client/proto/test.proto  && cat ./test_schema.json`

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "replit-river",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.11",
    "maintainer_email": null,
    "keywords": "rpc, websockets",
    "author": "Replit",
    "author_email": "eng@replit.com",
    "download_url": "https://files.pythonhosted.org/packages/63/d0/cf3e1765cd7b168b65aab1449b4829714a8999032e46f8c202867d284f77/replit_river-0.1.9.tar.gz",
    "platform": null,
    "description": "# River\n\nMachinery for compatibility with <https://github.com/replit/river>, the protocol behind the Workspace \u2194 pid2 WebSocket (and in general, the protocol behind the Workspace \u2194 * WebSocket).\n\nSince the pid2 services are declared in TypeScript using [TypeBox](https://github.com/sinclairzx81/typebox/) in the main repl-it-web repository, and it would be terrible for everyone involved to force folks to follow this paradigm of declaring their services, types, and interfaces in a foreign repository, any other River servers will use gRPC for their protocol definition and implementation. The [`@replit/river-codegen`](https://www.npmjs.com/package/@replit/river-codegen) package can be used to compile the gRPC `.proto` files into a River-compatible TypeBox declaration that can be then packaged into an npm package that can be imported by the Workspace and consumed ergonomically.\n\nThis includes the necessary machinery to act as a client or server for River:\n\n* As a River server, create a WebSocket server and the gRPC -> Python River codegen (similar to the protoc flow that generates the Python bindings).\n* As a River client, create a WebSocket client and the JSON Schema -> Python River codegen.\n  `python -m river.codegen client --output pkgs/river/river/schema.py --client-name Pid2Client pkgs/river/schema.json`\n* If we need to create the client-side of a Python gRPC River server, we also need to generate the JSON schema from the .proto file, with this command:\n  `python -m river.codegen server-schema --output pkgs/river/river/schema.py  pkgs/river/tests/client/proto/test.proto  && cat ./test_schema.json`\n",
    "bugtrack_url": null,
    "license": "LICENSE",
    "summary": "Replit river toolkit for Python",
    "version": "0.1.9",
    "project_urls": null,
    "split_keywords": [
        "rpc",
        " websockets"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2906cdad37da4e6c0cf3d2683775fed991e351a99880537c089201265f518860",
                "md5": "7af8182fc7020b8112729e4651c73c0f",
                "sha256": "47cf9c6015a3468b40518b68d6a10662abce550f1796d8be70207d20f15b7bd2"
            },
            "downloads": -1,
            "filename": "replit_river-0.1.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7af8182fc7020b8112729e4651c73c0f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 34923,
            "upload_time": "2024-04-25T06:51:58",
            "upload_time_iso_8601": "2024-04-25T06:51:58.323683Z",
            "url": "https://files.pythonhosted.org/packages/29/06/cdad37da4e6c0cf3d2683775fed991e351a99880537c089201265f518860/replit_river-0.1.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "63d0cf3e1765cd7b168b65aab1449b4829714a8999032e46f8c202867d284f77",
                "md5": "21b2c68e43191ef9de32b5dd99534cc5",
                "sha256": "5b1cefd467da10fcda8bf13564d17e153c51c488e0cd5d88f53896e033e5762a"
            },
            "downloads": -1,
            "filename": "replit_river-0.1.9.tar.gz",
            "has_sig": false,
            "md5_digest": "21b2c68e43191ef9de32b5dd99534cc5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 27208,
            "upload_time": "2024-04-25T06:52:00",
            "upload_time_iso_8601": "2024-04-25T06:52:00.011567Z",
            "url": "https://files.pythonhosted.org/packages/63/d0/cf3e1765cd7b168b65aab1449b4829714a8999032e46f8c202867d284f77/replit_river-0.1.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-25 06:52:00",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "replit-river"
}
        
Elapsed time: 0.25122s