replit-river


Namereplit-river JSON
Version 0.13.1 PyPI version JSON
download
home_pageNone
SummaryReplit river toolkit for Python
upload_time2024-12-10 19:32:11
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/3f/9c/24d1ef8f1bd8cff540d63c52edff4e92252a038215df95f98d6a1509559f/replit_river-0.13.1.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.13.1",
    "project_urls": null,
    "split_keywords": [
        "rpc",
        " websockets"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2d4eafe27c59de520131257db404f6f226f08de7a3afc295f12fa6deb7d7e5dc",
                "md5": "babc744260aa67f6da7cf026797ba7a6",
                "sha256": "b28b6749c3864f3063c4586f346773fb32baaa2dd40211593dba233eaef283bd"
            },
            "downloads": -1,
            "filename": "replit_river-0.13.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "babc744260aa67f6da7cf026797ba7a6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.11",
            "size": 47738,
            "upload_time": "2024-12-10T19:32:08",
            "upload_time_iso_8601": "2024-12-10T19:32:08.964208Z",
            "url": "https://files.pythonhosted.org/packages/2d/4e/afe27c59de520131257db404f6f226f08de7a3afc295f12fa6deb7d7e5dc/replit_river-0.13.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3f9c24d1ef8f1bd8cff540d63c52edff4e92252a038215df95f98d6a1509559f",
                "md5": "064e6d6585518a36e5a37517355017d8",
                "sha256": "4c34ce39a3ef9e68c02cf4e6ab09491ed7acb754ac8d473826a66b1ffd9159e4"
            },
            "downloads": -1,
            "filename": "replit_river-0.13.1.tar.gz",
            "has_sig": false,
            "md5_digest": "064e6d6585518a36e5a37517355017d8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.11",
            "size": 83717,
            "upload_time": "2024-12-10T19:32:11",
            "upload_time_iso_8601": "2024-12-10T19:32:11.495431Z",
            "url": "https://files.pythonhosted.org/packages/3f/9c/24d1ef8f1bd8cff540d63c52edff4e92252a038215df95f98d6a1509559f/replit_river-0.13.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-10 19:32:11",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "replit-river"
}
        
Elapsed time: 1.02456s