Server and client runtime library for Connect RPC
Actively maintained. Last release 5 weeks ago, commits in 26 of the last 26 weeks. A safe choice.
pip install connectrpcConnect for Python
Connect is the easiest way to build modern APIs.
Why Connect?
Building an API usually means writing the same types at least twice: once on the server, and once in every client. Connect makes this simple - define your API schema using Protobuf, and Connect generates type-safe server stubs and idiomatic client libraries in every major language, including for your frontend. All that's left to write is your business logic, in plain Python.
Connect already works with your current tech stack:
- Connect is built on top of HTTP and speaks both Protobuf and JSON, so
curlworks out of the box. - It interoperates seamlessly with gRPC and gRPC-Web, and supports streaming as a first-class feature.
- It runs on WSGI/ASGI. Build Connect APIs alongside your current API framework - all in the same app.
Features
- Servers: WSGI and ASGI-ready (including trio), use with any compatible server
- Clients: Lightweight sync and async clients, backed by
pyqwest - Protocols: Supports Connect, gRPC, and gRPC-Web (HTTP/1.1 and HTTP/2)
- Type safety: Fully type-annotated generated code
- Full support for server, client, and bidirectional streaming