Replit river toolkit for Python
Project description
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 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
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 on the Releases page.
Maintainers can see the next Draft
release, regenerated every time 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file replit_river-0.11.1.tar.gz
.
File metadata
- Download URL: replit_river-0.11.1.tar.gz
- Upload date:
- Size: 40.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41c6d8af407bc3dbe377ba05292a061ce9592b2f4342573f8cb4768d1a786117 |
|
MD5 | 62ed672e4561faecb130e4ac03b12b92 |
|
BLAKE2b-256 | 272a79b68b58849b1c77b7eb55efef30d8c911258348ea475b85f8798aa46605 |
File details
Details for the file replit_river-0.11.1-py3-none-any.whl
.
File metadata
- Download URL: replit_river-0.11.1-py3-none-any.whl
- Upload date:
- Size: 45.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | daef68dd45b675f4405c860ec139bdf8f8d854df5ff9384f8c531dd6a431fad1 |
|
MD5 | c6a90c875a554e2b4ee19d7b777de852 |
|
BLAKE2b-256 | 2609e1a417801953837389ddea83b70b581cd9c3d95e66ae138183f2716ed008 |