pypi pyvoy 0.4.0
v0.4.0

latest releases: 1.5.1, 1.5.0, 1.4.0...
5 months ago

This release has a significant stability issue due to a bug introduced in Envoy 1.38 with a currently unreleased fix. 0.4.2 manually backports the fix, use it instead

This is a very large release, continuing pyvoy's vision of using Envoy as a standard library for networking operations. Aside from updating Envoy to 1.38, there are two big features in this release.

Websockets

pyvoy now supports ASGI websockets - they have been implemented as a Envoy network filter. Envoy does not have support for websockets, so unlike with normal HTTP servers, we get less features from it, but can still take advantage of it's robust TCP stack and network level controls. The websockets implementation itself is tungstenite, a popular Rust library for websockets. We have patched in support for per-message-deflate so compression is supported. The implementation passes the full autobahn testsuite.

HTTP client

pyvoy now also includes a custom transport for use with pyqwest. The transport uses Envoy itself for outbound HTTP calls. While pyqwest's Rust stack is already quite robust, this is still useful for keeping all I/O on one stack, and Envoy still has some great features like circuit breakers, etc built in. Notably, the clients will do client-side load balancing via DNS, possibly the first such client in Python. This is particularly useful when using HTTP/2.

One hard limitation on the HTTP client is because it is driven by callbacks in the Envoy request handler, any client call is tied to the request handler's lifecycle, meaning fire-and-forget type of invocations are not supported. The response must complete before the application request handler does. For fire-and-forget invocations, use a normal Pyqwest transport - nothing stops from having multiple clients as needed.

The HTTP client currently only supports ASGI - WSGI will come soon.

New Contributors

Full Changelog: v0.3.0...v0.4.0

Don't miss a new pyvoy release

NewReleases is sending notifications on new releases.