replit-river


Namereplit-river JSON
Version 0.12.3 PyPI version JSON
download
home_pageNone
SummaryReplit river toolkit for Python
upload_time2024-11-22 22:04:46
maintainerNone
docs_urlNone
authorNone
requires_python<4,>=3.11
licenseMIT License Copyright (c) 2024 Replit 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 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`

## Publishing

### Release Drafts
Pending releases are curated by [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) on the [Releases](https://github.com/replit/river-python/releases) page.

Maintainers can see the next `Draft` release, regenerated every time [release-drafter.yml](https://github.com/replit/river-python/actions/workflows/release-drafter.yml) is triggered.

### PR Labeling

PRs merged since the last release are considered, with the labels on those PRs used for release metadata. `feature`, `bug`, `chore`, and `dependencies` are used for categorization, `major`, `minor`, and `patch` are used to influence the next release's version.

These labels can be altered after merge, re-trigger release-drafter to get it to regenerate the draft once you've curated the next release.

### Triggering release

The tag version is used to set the version during the build, the value in `pyproject.toml` is not expected to be kept up-to-date.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "replit-river",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4,>=3.11",
    "maintainer_email": null,
    "keywords": "rpc, websockets",
    "author": null,
    "author_email": "Replit <eng@replit.com>",
    "download_url": "https://files.pythonhosted.org/packages/4e/dd/edd396d361135dbcc7bf691ca5a6a854c602a656c457ddaa04ab5afac904/replit_river-0.12.3.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\n## Publishing\n\n### Release Drafts\nPending releases are curated by [release-drafter/release-drafter](https://github.com/release-drafter/release-drafter) on the [Releases](https://github.com/replit/river-python/releases) page.\n\nMaintainers can see the next `Draft` release, regenerated every time [release-drafter.yml](https://github.com/replit/river-python/actions/workflows/release-drafter.yml) is triggered.\n\n### PR Labeling\n\nPRs merged since the last release are considered, with the labels on those PRs used for release metadata. `feature`, `bug`, `chore`, and `dependencies` are used for categorization, `major`, `minor`, and `patch` are used to influence the next release's version.\n\nThese labels can be altered after merge, re-trigger release-drafter to get it to regenerate the draft once you've curated the next release.\n\n### Triggering release\n\nThe tag version is used to set the version during the build, the value in `pyproject.toml` is not expected to be kept up-to-date.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Replit  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": "Replit river toolkit for Python",
    "version": "0.12.3",
    "project_urls": null,
    "split_keywords": [
        "rpc",
        " websockets"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "194b730e7c63c4068de08cf489519b1d7293e6d953951159f2b2b76da43ec9d0",
                "md5": "13017b97c2f82b0b4b70097a47d983eb",
                "sha256": "5e87f2d52f95fbe0841db2a6fe2f2858cd3f7dd0a73f136a4bc0d9f2fe3a4aec"
            },
            "downloads": -1,
            "filename": "replit_river-0.12.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "13017b97c2f82b0b4b70097a47d983eb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.11",
            "size": 46192,
            "upload_time": "2024-11-22T22:04:44",
            "upload_time_iso_8601": "2024-11-22T22:04:44.928431Z",
            "url": "https://files.pythonhosted.org/packages/19/4b/730e7c63c4068de08cf489519b1d7293e6d953951159f2b2b76da43ec9d0/replit_river-0.12.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4eddedd396d361135dbcc7bf691ca5a6a854c602a656c457ddaa04ab5afac904",
                "md5": "7e32acf6e54934a325f6c0d26f53841d",
                "sha256": "ae8bda5206b2a20d6cbe464f5a739f2ddef2d9db3607f2214ca3b9fc2758f1bd"
            },
            "downloads": -1,
            "filename": "replit_river-0.12.3.tar.gz",
            "has_sig": false,
            "md5_digest": "7e32acf6e54934a325f6c0d26f53841d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.11",
            "size": 41619,
            "upload_time": "2024-11-22T22:04:46",
            "upload_time_iso_8601": "2024-11-22T22:04:46.627297Z",
            "url": "https://files.pythonhosted.org/packages/4e/dd/edd396d361135dbcc7bf691ca5a6a854c602a656c457ddaa04ab5afac904/replit_river-0.12.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-22 22:04:46",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "replit-river"
}
        
Elapsed time: 0.71780s