Skip to main content

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

replit_river-0.6.4.tar.gz (33.5 kB view details)

Uploaded Source

Built Distribution

replit_river-0.6.4-py3-none-any.whl (42.1 kB view details)

Uploaded Python 3

File details

Details for the file replit_river-0.6.4.tar.gz.

File metadata

  • Download URL: replit_river-0.6.4.tar.gz
  • Upload date:
  • Size: 33.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Linux/6.8.0-1014-azure

File hashes

Hashes for replit_river-0.6.4.tar.gz
Algorithm Hash digest
SHA256 837b6efda8ecf737e99a3c4c0a554d6b9e43d2b5e850e90c7698ff0f95b32904
MD5 bac5fbc9a1e8460ffae990f729dcb43c
BLAKE2b-256 50cc146723bca21a91af80cd4f293677c6169f94d516d95242aec0fa94a16182

See more details on using hashes here.

File details

Details for the file replit_river-0.6.4-py3-none-any.whl.

File metadata

  • Download URL: replit_river-0.6.4-py3-none-any.whl
  • Upload date:
  • Size: 42.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.6 Linux/6.8.0-1014-azure

File hashes

Hashes for replit_river-0.6.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1e43298ff22b6d77ebb56349d73e475f8177f0f6387e1e74f356f0100b030fb7
MD5 02176bf213d52be679075119d00900bb
BLAKE2b-256 7939c1bc65e3dce0172113fe7a06dd8086ff9ddf76a3cbb0e9c5ba3de8c23189

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page