betterproto2-compiler
Compiler for betterproto2
Decision gist · record as of 2026-08-14
Yes, with conditions. Install if you need async gRPC support, type hints, and idiomatic Python code generation from Protobuf 3 schemas. The low install friction, active maintenance, and MIT license support adoption. However, accept that the project is under active development with incomplete documentation and potential breaking changes—unsuitable for production systems requiring stability guarantees.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or higher; the package is under active development and may introduce breaking changes.
- Low install friction with a pure-wheel distribution.
- The package is actively maintained with a recent commit history, though it explicitly notes ongoing development and potential breaking changes.
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
last release 2026-05-13 (93 days) · last repo commit 2026-08-01 · 170 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 119,230 downloads/mo, #12,079 on PyPI
Alternatives
Verify before relying
pip install betterproto2-compiler
from betterproto2 import Message
class Example(Message):
name: str = 1- Exact scope of breaking changes expected during active development and timeline for stabilization
- Whether generated code is fully compatible with standard gRPC tooling and ecosystems
- Performance characteristics compared to the original betterproto or Google's protoc plugin
What it is and what it does
betterproto2-compiler is a code generator that transforms Protobuf 3 and gRPC definitions into readable, idiomatic Python code. It reimplements Google's protoc plugin from the ground up, prioritizing modern Python idioms—dataclasses, async/await, type hints, and built-in datetime objects—over legacy patterns. The generated code includes both binary and JSON serialization, supports Pydantic model generation, and produces importable modules with proper `__init__.py` files.
The package addresses long-standing limitations of the official protoc plugin: it adds native async support, full type checking and IDE completion, relative imports that work in Python 3, and avoids name-collision bugs. While the wire format remains compatible with standard Protobuf, the generated API differs—using Pythonic method names and patterns instead of capitalized functions like `HasField()` or `SerializeToString()`. The project is actively developed but explicitly subject to breaking changes, and documentation is incomplete.
Use it for
- Generate async gRPC service stubs and client code without requiring additional plugins or manual async wrapping.
- Create type-hinted, IDE-friendly Python dataclasses from Protobuf schemas for better developer experience and static analysis.
- Build Pydantic-compatible models directly from Protobuf definitions for validation and serialization workflows.
- Modernize Protobuf-based Python projects by replacing Google's protoc plugin with idiomatic, readable generated code.
- Develop microservices that use Protobuf for serialization while leveraging Python's async/await and modern language features.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
Install if you need async gRPC support, type hints, and idiomatic Python code generation from Protobuf 3 schemas. The low install friction, active maintenance, and MIT license support adoption. However, accept that the project is under active development with incomplete documentation and potential breaking changes—unsuitable for production systems requiring stability guarantees.
Install
betterproto2-compiler on PyPI
Before you install
Low install friction with a pure-wheel distribution. The package is actively maintained with a recent commit history, though it explicitly notes ongoing development and potential breaking changes.
Requires Python 3.10 or higher; the package is under active development and may introduce breaking changes.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it suitable for both open-source and commercial projects.
Quickstart
pip install betterproto2-compiler
from betterproto2 import Message
class Example(Message):
name: str = 1
Verify before relying
- Exact scope of breaking changes expected during active development and timeline for stabilization
- Whether generated code is fully compatible with standard gRPC tooling and ecosystems
- Performance characteristics compared to the original betterproto or Google's protoc plugin
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 5 packagesbetterproto2ruffjinja2typing-extensionsstrenum |
| Maintenance | Actively maintained 93 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 119,230 / month, #12,079 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: betterproto2_compiler-0.10.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “grpc compiler async python”
- betterproto2-compilerGenerates idiomatic Python code from Protobuf 3 and gRPC definitions,…
- aristaprotoGenerates Python gRPC stubs and message classes from Protocol Buffer…
- betterprotoGenerates idiomatic Python code from Protobuf 3 and gRPC definitions,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Build Tools packages
Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.
Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.
Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.
pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.
Install it if your team needs consistent, automated validation at commit time.
See also betterproto2 · betterproto · betterproto-rust-codec · betterproto-fw · aristaproto · protoc-gen-openapiv2 · protobuf-py · grpc-gateway-protoc-gen-openapiv2 · grpclib