betterproto
A better Protobuf / gRPC generator & library
Decision gist · record as of 2026-08-14
Yes, if you are committed to Protobuf 3 and value idiomatic, readable generated code with async support—but with caution. The package has not shipped a release since 2020-05-27 despite recent repository commits, signaling stalled maintenance at the release level. It remains suitable for new projects or teams already using it, but consider the risk of unpatched issues and incompatibility with future Protobuf or gRPC versions. No known security vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires protoc (Protocol Buffer compiler) installed on the system; Python 3.6 or later.
- High install friction due to compiler dependencies.
- The package has not seen a release since 2020-05-27 despite repository activity through 2025-07-17, indicating maintenance has stalled at the release level.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions, making it safe for most projects from a licensing standpoint.
last release 2020-05-27 (2270 days) · last repo commit 2025-07-17 · 1,769 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,575,811 downloads/mo, #2,573 on PyPI
Alternatives
Verify before relying
# Install with compiler support
pip install "betterproto[compiler]"
# Generate from proto file
protoc -I . --python_betterproto_out=. example.proto
# Use generated code
import betterproto
@dataclass
class Message(betterproto.Message):
value: str = betterproto.string_field(1)
test = Message(value="example")
serialized = bytes(test)
another = Message().parse(serialized)- Current compatibility with Protobuf 3 versions released after 2020-05-27
- Whether async gRPC support works with current grpclib versions
- Active maintenance status given no releases in nearly 6 years despite recent commits
What it is and what it does
Betterproto is a code generator and runtime library that converts Protobuf 3 and gRPC service definitions into readable, idiomatic Python code. It addresses limitations in the official Google Protobuf Python plugin by generating dataclasses with type hints, async/await support, and modern Python conventions instead of the verbose, non-idiomatic code the official plugin produces. The generated messages support both binary and JSON serialization, timezone-aware datetime objects, and work with mypy for static type checking.
You install the package in two modes: with the `[compiler]` extra to get the protoc plugin for code generation, or without it to only use the runtime library for deserializing messages. Once generated, your Protobuf messages become standard Python dataclasses that feel native to the language, with methods like `to_json()`, `to_dict()`, and `parse()` rather than the camelCase method names of the official library.
Use it for
- Generate gRPC service stubs with async/await support for building high-concurrency microservices
- Convert Protobuf definitions to typed Python dataclasses for IDE autocomplete and mypy validation
- Serialize and deserialize messages to/from JSON with configurable field naming (camelCase or snake_case)
- Build APIs where Protobuf messages integrate naturally with modern Python async frameworks
- Replace the official Google Protobuf plugin when its generated code is unreadable or import paths break
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are committed to Protobuf 3 and value idiomatic, readable generated code with async support—but with caution.
The package has not shipped a release since 2020-05-27 despite recent repository commits, signaling stalled maintenance at the release level. It remains suitable for new projects or teams already using it, but consider the risk of unpatched issues and incompatibility with future Protobuf or gRPC versions. No known security vulnerabilities.
Install
betterproto on PyPI
Before you install
High install friction due to compiler dependencies. The package has not seen a release since 2020-05-27 despite repository activity through 2025-07-17, indicating maintenance has stalled at the release level. Suitable for projects already committed to Protobuf 3 and willing to manage aging tooling.
Requires protoc (Protocol Buffer compiler) installed on the system; Python 3.6 or later.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it safe for most projects from a licensing standpoint.
Quickstart
# Install with compiler support
pip install "betterproto[compiler]"
# Generate from proto file
protoc -I . --python_betterproto_out=. example.proto
# Use generated code
import betterproto
@dataclass
class Message(betterproto.Message):
value: str = betterproto.string_field(1)
test = Message(value="example")
serialized = bytes(test)
another = Message().parse(serialized)
Verify before relying
- Current compatibility with Protobuf 3 versions released after 2020-05-27
- Whether async gRPC support works with current grpclib versions
- Active maintenance status given no releases in nearly 6 years despite recent commits
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Aging 2,270 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,575,811 / month, #2,573 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: betterproto-1.2.5.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
An agent finds packages by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language. Give your agent the search over MCP.
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 aristaproto · betterproto-fw · betterproto2 · betterproto2-compiler · betterproto-rust-codec · grpclib · protobuf-py · protobuf_to_pydantic · protoletariat