$npx skillfedfor your agent

betterproto2

A better Protobuf / gRPC generator & library

With conditionsPyPI Build ToolsReleased May 2026916.8K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — betterproto2-0.10.0-py3-none-any.whl
v0.10.0 · released 2026-05-10 · Python <4.0,>=3.10 · 2 runtime deps: python-dateutil, typing-extensions

Yes, if you are starting a new async gRPC project in Python 3.10+ and want modern, readable generated code with type support. Conditional caution: the project explicitly warns of active development and potential breaking changes, so pin versions carefully and review release notes before upgrading. Not suitable if you require long-term API stability or need to support Python versions below 3.10.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10 or higher; Protobuf 3 and a protoc compiler setup.
  • Low install friction with only two lightweight runtime dependencies (python-dateutil and typing-extensions).
  • Active maintenance with recent commits; however, the project is in active development and explicitly warns of potential breaking changes.

License · maintenance · safety

MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; attribution required.

last release 2026-05-10 (96 days) · last repo commit 2026-08-01 · 170 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 916,789 downloads/mo, #4,728 on PyPI

Verify before relying

pip install betterproto2

import betterproto2

# Generated code uses modern Python dataclasses and async/await
  • Whether generated code is fully compatible with existing protoc-generated code in mixed projects
  • Current state of Pydantic model generation support and completeness
  • Scope and timeline of documented breaking changes still expected during active development
Same gist for agents: .md · .json

What it is and what it does

Betterproto2 is a code generator and runtime library that converts Protobuf and gRPC definitions into readable, idiomatic Python code. Unlike the official Google protoc plugin, it generates modern Python using dataclasses, type hints, async/await syntax, and timezone-aware datetime objects, making the output both more Pythonic and easier to work with in contemporary codebases.

The library targets Protobuf 3 and modern Python (3.10+), and can generate Pydantic models alongside standard dataclasses. It handles both binary and JSON serialization natively. The project is a ground-up redesign of the original betterproto, still in active development with known breaking changes possible; it trades stability for the ability to fix bugs and add features the official plugin lacks.

Use it for

  • Building async gRPC services in Python where the official protoc plugin's lack of native async support is a blocker.
  • Generating type-checkable Protobuf message classes that work seamlessly with mypy and IDE code completion.
  • Creating Pydantic-compatible models from Protobuf definitions for validation and serialization in modern frameworks.
  • Modernizing Protobuf workflows to use Python idioms (e.g., None instead of special wrapped types, datetime instead of Timestamp).
  • Replacing Google's protoc plugin when import path issues or name-clash bugs affect your project.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you are starting a new async gRPC project in Python 3.10+ and want modern, readable generated code with type support.

Conditional caution: the project explicitly warns of active development and potential breaking changes, so pin versions carefully and review release notes before upgrading. Not suitable if you require long-term API stability or need to support Python versions below 3.10.

Install

betterproto2 on PyPI

Before you install

Low install friction with only two lightweight runtime dependencies (python-dateutil and typing-extensions). Active maintenance with recent commits; however, the project is in active development and explicitly warns of potential breaking changes.

Requires Python 3.10 or higher; Protobuf 3 and a protoc compiler setup.

License in practice

MIT license permits commercial and private use with minimal restrictions; attribution required.

Quickstart

pip install betterproto2

import betterproto2

# Generated code uses modern Python dataclasses and async/await

Verify before relying

  • Whether generated code is fully compatible with existing protoc-generated code in mixed projects
  • Current state of Pydantic model generation support and completeness
  • Scope and timeline of documented breaking changes still expected during active development

Package facts

LicenseMIT permissive
Python supportSupports the current Python release <4.0,>=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
python-dateutiltyping-extensions
MaintenanceActively maintained 96 days since the last release
Last repo commit
First released
Downloads916,789 / month, #4,728 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: betterproto2-0.10.0-py3-none-any.whl

Tags

Capabilities
protobuf code generation pythongrpc python generatorasync protobuf pythonprotobuf to python dataclassmodern protobuf pythongrpc async pythonprotobuf type hints
Topics
protobuf-codegengrpc-asynctype-hints
PyPI keywords
protobufgRPC

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 › “modern protobuf python”

  • betterproto2Generates idiomatic Python code from Protobuf and gRPC definitions,…
  • betterproto-fwGenerates idiomatic Python code from Protobuf 3 and gRPC definitions,…
  • 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

packaging Worth it
PyPI · Build Tools · released Aug 2026

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.

Apache-2.0 OR BSD-2-Clausepure Python · 3.9+
2.2Bdownloads / mo
tqdm Worth it
PyPI · Libraries · released Jul 2026

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.

copyleftpure Python · 3.8+
648.6Mdownloads / mo
pip Worth it
PyPI · Build Tools · released Aug 2026

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.

MITpure Python · 3.10+
617.5Mdownloads / mo
hatchling Worth it
PyPI · Python Modules · released Aug 2026

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.

MITpure Python · 3.10+
484.2Mdownloads / mo
grpcio-tools Worth it
PyPI · Build Tools · released Jul 2026

Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.

Apache-2.0compiled wheel · 3.10+
278.2Mdownloads / mo
pre-commit Worth it
PyPI · Build Tools · released Aug 2026

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.

permissive licensepure Python · 3.10+
179.9Mdownloads / mo

See also betterproto2-compiler · betterproto-rust-codec · betterproto · betterproto-fw · aristaproto · protobuf-py · envoy_data_plane · grpc-gateway-protoc-gen-openapiv2 · protoc-gen-openapiv2 · protobuf-py-ext