protobuf3-to-dict
Ben Hodgson: A teeny Python library for creating Python dicts from protocol buffers and the reverse. Useful as an intermediate step before serialisation (e.g. to JSON). Kapor: upgrade it to PB3 and PY3, rename it to protobuf3-to-dict
What it is and what it does
protobuf3-to-dict bridges protocol buffers and Python dictionaries, converting protobuf Message objects to dicts suitable for JSON serialization and back. It handles type conversions automatically—bytes become base64 strings, datetime objects map to Google's Timestamp type, and enums can be rendered as integers or string labels. The library also supports field validation using custom protobuf options to enforce required fields in Protobuf 3, where all fields are technically optional.
The package is a fork aimed at Protobuf 3 and Python 3 compatibility, though it has not been actively maintained since 2017. It carries no runtime dependencies and works as a thin conversion layer between serialization formats.
Use it for:
- Convert protobuf messages to JSON by first materializing them as dicts for JSON serialization
- Validate incoming dictionary data against protobuf message schemas before converting to protobuf objects
- Inspect and manipulate protobuf message fields and options programmatically without hand-coding schema reflection
- Round-trip protobuf messages through dict representation for testing or intermediate processing
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts protocol buffer messages to Python dictionaries and back, with built-in support for datetime conversion and field validation.
No. The package is abandoned (last commit 2022-05-31) and requires non-standard git-based installation. High install friction combined with stale maintenance makes this a poor choice for new projects.
Install
protobuf3-to-dict on PyPI
pip
pip install protobuf3-to-dictuv
uv add protobuf3-to-dictpoetry
poetry add protobuf3-to-dictInstalling protobuf3-to-dict
Before you install
High install friction: requires git-based installation from a fork rather than PyPI. Maintenance is abandoned—last commit was 2022-05-31, over three years ago. No active development or support.
License in practice
Public Domain license means no restrictions on use, modification, or distribution. You may use this freely in any context, commercial or otherwise, with no attribution requirement.
Quickstart
from protobuf3_to_dict import protobuf_to_dict, dict_to_protobuf
my_message_dict = protobuf_to_dict(my_message)
msg = dict_to_protobuf(MyMessage, values=my_message_dict)
Requires git-based installation; expects a google.protobuf.message.Message subclass as input.
Verify before relying
- Compatibility with current protobuf library versions (last release 2017-02-23)
- Whether the fork referenced in the description is actively maintained or also abandoned
- Python 3 support level beyond the listed 3.5 classifier
- Whether native protobuf JSON support in Protobuf 3.0.0+ makes this package obsolete
Package facts
| License | Public Domain (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | abandoned — 3,459 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 8,034,136/month — #1,670 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: protobuf3-to-dict-0.1.5.tar.gz
Keywords: protobuf, json, dict
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
foxglove-schemas-protobufProvides precompiled Protobuf message classes…
permissive · top 15,000 on PyPI
proto-plusProto Plus wraps protocol buffers to provide…
permissive · top 1,000 on PyPI
pure-protobufEncodes and decodes Protocol Buffer messages…
permissive · top 15,000 on PyPI
dbt-protosProvides Python Protocol Buffer bindings for…
permissive · top 1,000 on PyPI
mcap-protobuf-supportAdds protobuf message deserialization support…
permissive · top 15,000 on PyPI
protovalidateValidates Protocol Buffer messages against…
permissive · top 5,000 on PyPI
opentelemetry-protoProvides generated protobuf message classes for…
permissive · top 1,000 on PyPI
aristaprotoGenerates Python gRPC stubs and message classes…
permissive · top 15,000 on PyPI
protoc-wheel-0Provides pre-built wheels of the Google…
permissive · top 15,000 on PyPI
protobuf-decoderDecodes protobuf binary messages without…
permissive · top 15,000 on PyPI