--- id: protoc-gen-connect-python version: "0.9.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # protoc-gen-connect-python — Code generator for connect-python License: permissive · Maintenance: active · Downloads: 255.2K/mo ## What it is and what it does protoc-gen-connect-python is a code generator plugin for the protoc compiler that transforms Protobuf service definitions into idiomatic Python code for the Connect RPC protocol. It sits in the buf code generation pipeline and outputs type-annotated stubs that work with both WSGI and ASGI frameworks on the server side, and provides client implementations on the client side. Developers define their Protobuf schema once, run the generator, and get Python classes ready to subclass for servers or instantiate for clients. The plugin supports the Connect, gRPC, and gRPC-Web protocols, handles streaming natively, and integrates middleware and interceptors. The generated code is compatible with HTTP/1.1 and HTTP/2. Use it for: - Generate type-safe Python server stubs from a Protobuf service definition to implement with ASGI/WSGI frameworks. - Create client code automatically from Protobuf schemas for calling remote services. - Build polyglot APIs where the same schema generates clients in multiple languages. - Set up RPC middleware for logging, tracing, and metrics via interceptors. - Migrate from gRPC to Connect while maintaining protocol interoperability. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A protoc plugin that generates Python client and server code for the Connect RPC protocol from Protobuf service definitions. Yes, if you are building or consuming Connect RPC services in Python. The plugin is actively maintained, has no known vulnerabilities, supports Python 3.10 through 3.14, and eliminates manual code duplication between client and server definitions. Install it as a dev dependency in your buf-based code generation workflow. Not necessary if you are not using Connect or Protobuf. ## Install pip install protoc-gen-connect-python uv add protoc-gen-connect-python poetry add protoc-gen-connect-python ## Installing protoc-gen-connect-python Before you install: Medium install friction: distributed as pre-built wheels across multiple platforms (macOS arm64/x86_64, Linux aarch64/x86_64, Windows amd64/arm64), but requires Python 3.10 or later and is typically installed as a development dependency. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for both open-source and proprietary projects. Quickstart: # Install as development dependency uv add --dev protoc-gen-connect-python # Configure in buf.gen.yaml: # version: v2 # plugins: # - local: .venv/bin/protoc-gen-connectrpc # out: gen # Run buf generate to produce Python code from .proto files Requires Python 3.10 or later; used as a protoc plugin within a buf code generation workflow, not as a runtime library. Verify before relying: - Whether the plugin works with both protobuf-py and google-protobuf implementations without additional configuration. - Performance characteristics and code generation speed for large Protobuf schemas. - Compatibility with existing gRPC Python codebases during migration to Connect. - What runtime dependencies the generated code requires beyond the protoc plugin itself. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 255.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags protoc plugin python code generation, connect rpc python codegen, protobuf python client server generator, connect protocol python plugin, rpc code generator python, protobuf schema to python code, connect-rpc python stubs, code-generation, protobuf, rpc-framework [View on SkillFed](https://skillfed.io/packages/protoc-gen-connect-python) · [View on PyPI](https://pypi.org/project/protoc-gen-connect-python/)