--- id: betterproto-fw version: "2.0.3" license: MIT license_treatment: permissive maintenance: aging --- # betterproto-fw — A better Protobuf / gRPC generator & library License: permissive · Maintenance: aging · Downloads: 495.0K/mo ## What it is and what it does betterproto-fw is a code generator and runtime library for Protobuf 3 and gRPC that produces modern, readable Python code using dataclasses, type hints, and async/await. It generates clean classes that inherit from betterproto.Message and support both binary and JSON serialization out of the box, using grpclib for async gRPC support. The package includes both a protoc plugin (installed via the [compiler] extra) for code generation and a runtime library for using the generated code. It generates async-first gRPC stubs, supports Pydantic model generation, and uses Python's built-in datetime for timestamp/duration types. The wire format is identical to standard Protobuf, so generated code can interoperate with other Protobuf implementations. Use it for: - Generate async gRPC client and server stubs with full type hints and IDE completion support. - Convert Protobuf message definitions into dataclasses for use in modern Python applications. - Serialize and deserialize messages to/from JSON with configurable field naming (camelCase or snake_case). - Build microservices using async/await patterns with gRPC and grpclib. - Work with Protobuf 3 messages using timezone-aware datetime and timedelta objects. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates idiomatic Python code from Protobuf 3 and gRPC definitions, with built-in async/await support, JSON serialization, and modern type hints via dataclasses. Yes, if you are building gRPC services or working with Protobuf 3 and want modern, readable generated Python code with async support. The low install friction and permissive MIT license make it straightforward. However, the aging maintenance status (453 days since last release) means you should verify that the generated code and runtime meet your current Protobuf and gRPC versions before committing to production. ## Install pip install betterproto-fw uv add betterproto-fw poetry add betterproto-fw ## Installing betterproto-fw Before you install: Low install friction with three lightweight runtime dependencies (grpclib, python-dateutil, typing-extensions). Package is aging—last release was 453 days ago—so maintenance activity is minimal; use only if the generated code meets your needs without expecting active updates. License in practice: MIT license is permissive; you can use, modify, and distribute this package and code it generates with minimal restrictions, provided you retain the license notice. Quickstart: pip install betterproto-fw import betterproto test = Greeting(message="Hello") serialized = bytes(test) another = Greeting().parse(serialized) print(another.to_json()) Requires protoc compiler and grpcio-tools to generate code from .proto files; requires Python 3.9+. Verify before relying: - Whether betterproto-fw is actively maintained or is a snapshot of an upstream project. - Compatibility with the latest Protobuf 3 wire format and any breaking changes in recent gRPC releases. - Performance characteristics compared to the official Google protoc Python plugin for large message volumes. - Whether the fork maintains feature parity with the original betterproto project. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 495.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags protobuf code generation python, grpc async python, protobuf to dataclass, modern protobuf python, grpc stub generation, protobuf json serialization, async grpc client server, protobuf-codegen, async-grpc, dataclass-serialization [View on SkillFed](https://skillfed.io/packages/betterproto-fw) · [View on PyPI](https://pypi.org/project/betterproto-fw/)