Venom is an upcoming RPC framework for Python
Venom is an upcoming RPC framework for Python. It features a simple, testable, composable service model and support for the Python 3 typing module. It will support unary (single message) and streaming communication patterns inspired by gRPC. The framework uses a simple message format for communications, compatible with the ProtocolBuffer format. The aim of Venom is to provide a low overhead framework for RPC service development specifically in Python while sticking to language agnostic communication standards.
So far, Venom RPC supports unary requests & replies that are defined as methods on services. The framework is designed to support different server implementations.
The currently available implementations are:
- Unary HTTP/1 protocol implementation using aiohttp (asynchronous) or flask (synchronous only)
- Unary gRPC protocol implementation using grpcio
Documentation currently is minimal! Head to the examples/ folder for more details.
Venom RPC alpha requires Python 3.5. The final version will likely require Python 3.6.
To install Venom using ‘pip’ for use with aiohttp, run:
pip install venom[aiohttp]
To install Venom using ‘pip’ for use with flask, run:
pip install flask-venom
A list of major features required for the first release:
- Schema validation
- Message generation from request arguments
- OpenAPI (Swagger) schema service for API reflection
An unordered list of potential future features:
CLI for generating sharable stubs from services
Streaming WebSocket implementation with aiohttp
This would be the only solution that fully supports streaming and can be used in the browser today.
Streaming gRPC (HTTP/2) implementation with e.g. hyper-h2
There’s already an experimental gRPC implementation based on grpcio, but without true support for asynchronous calls because that is not supported by the official Python library.
MsgPack serialization support
The problem with ProtocolBuffer as it stands now is that the official Python library for ProtocolBuffer is not very pythonic, while ease of development in Python is the primary motivator behind Venom.
Streamed responses would use Python 3.6 asynchronous generators.
Release history Release notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size venom-2.0.0.tar.gz (29.2 kB)||File type Source||Python version None||Upload date||Hashes View|