replit-river


Namereplit-river JSON
Version 0.1.18 PyPI version JSON
download
home_pageNone
SummaryReplit river toolkit for Python
upload_time2024-05-03 18:33:53
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/08/c3/c07485f50bd9fba151b29a2a11e38c6e788a8b0a04903085e154acf6664b/replit_river-0.1.18.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.18",
    "project_urls": null,
    "split_keywords": [
        "rpc",
        " websockets"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2631adaea59e0256a77baf22ef881d001c164d10e9e8d91846a2056bc3fb1622",
                "md5": "7df2fcb901b48bc2b22ff325b55e027a",
                "sha256": "7330e5ccf528cab2bdff5cd6fcecec9599ab9ef545c759b74cf4f62ba2b9c90d"
            },
            "downloads": -1,
            "filename": "replit_river-0.1.18-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7df2fcb901b48bc2b22ff325b55e027a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.11",
            "size": 35273,
            "upload_time": "2024-05-03T18:33:52",
            "upload_time_iso_8601": "2024-05-03T18:33:52.180095Z",
            "url": "https://files.pythonhosted.org/packages/26/31/adaea59e0256a77baf22ef881d001c164d10e9e8d91846a2056bc3fb1622/replit_river-0.1.18-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "08c3c07485f50bd9fba151b29a2a11e38c6e788a8b0a04903085e154acf6664b",
                "md5": "33c8d67bc02ce7561f72bb89ed0b4e1c",
                "sha256": "e514d9157d5e4ec73b4fa5c58723d2990a5f91e2e27b28d7abcc098f4a700f41"
            },
            "downloads": -1,
            "filename": "replit_river-0.1.18.tar.gz",
            "has_sig": false,
            "md5_digest": "33c8d67bc02ce7561f72bb89ed0b4e1c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.11",
            "size": 27241,
            "upload_time": "2024-05-03T18:33:53",
            "upload_time_iso_8601": "2024-05-03T18:33:53.913818Z",
            "url": "https://files.pythonhosted.org/packages/08/c3/c07485f50bd9fba151b29a2a11e38c6e788a8b0a04903085e154acf6664b/replit_river-0.1.18.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-03 18:33:53",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "replit-river"
}
        
Elapsed time: 0.29731s