Protobuf-py: Protobuf for Python, without compromises
4 days ago
- #library
- #protobuf
- #python
- Introducing protobuf-py, a new Python-first Protocol Buffers library that passes the full conformance suite for proto2, proto3, and editions.
- Designed to offer both completeness (full spec support) and a Pythonic API, unlike Google's package (C++/Java-influenced) or betterproto (incomplete).
- Keeps message data in Python objects with __slots__, using a Rust accelerator for performance; faster than upb in real-world use cases like parsing and reading fields.
- Generates readable, typed Python code with relative imports, enabling better tooling support (e.g., pyright, mypy) without global type conflicts.
- Built by Buf, aligning with their ecosystem (Buf CLI, ConnectRPC), and is ready for use with buf.gen.yaml, with optional Rust acceleration and no runtime dependencies.