$npx skillfedfor your agent

protobuf_to_pydantic

Generate the `pydantic.BaseModel` class (and the corresponding source code) with parameter verification function through the Protobuf file

Worth itPyPI Build ToolsReleased Jun 2025520.8K downloads / moApache Software LicensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — protobuf_to_pydantic-0.3.3.1-py3-none-any.whl
v0.3.3.1 · released 2025-06-07 · Python <4.0,>=3.7 · 2 runtime deps: pydantic, protobuf

Yes. The package solves a real friction point—keeping Protobuf schemas and Pydantic models in sync—with low install overhead, active maintenance, permissive licensing, and no known vulnerabilities. It supports Python 3.7 through 3.12 and integrates cleanly into existing protoc workflows. Install it if your project uses both protobuf and pydantic and you want to avoid hand-maintaining duplicate message definitions.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Plugin mode requires mypy-protobuf as an additional dependency; protoc or grpc_tools must be available in your environment.
  • Low friction install with just pydantic and protobuf as runtime dependencies.
  • Repository is active with a recent commit on 2026-06-07 and 148 stars; last release was 433 days ago, suggesting stable maintenance rather than rapid iteration.

License · maintenance · safety

Apache Software License (permissive) — Licensed under Apache Software License, a permissive license that allows commercial and private use with minimal restrictions, making it safe to adopt in most projects.

last release 2025-06-07 (433 days) · last repo commit 2026-06-07 · 148 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 520,804 downloads/mo, #6,208 on PyPI

Verify before relying

pip install protobuf_to_pydantic

# Plugin mode (recommended):
python -m grpc_tools.protoc -I. --protobuf-to-pydantic_out=. example.proto

# Runtime mode:
from protobuf_to_pydantic import message_to_pydantic
  • Exact scope of proto-gen-validate compatibility and which validation rules are currently supported versus planned.
  • Whether template customization is documented with concrete examples beyond the configuration file structure shown.
  • Performance characteristics when converting large or deeply nested Protobuf schemas.
  • Specific API surface and function names available in runtime mode for instantiating Pydantic models from protobuf messages.
Same gist for agents: .md · .json

What it is and what it does

protobuf_to_pydantic bridges Protobuf message definitions and Pydantic models, letting you generate validated Python dataclasses from .proto files. It works in two modes: as a protoc plugin that generates source code files (the recommended approach), or at runtime by parsing Protobuf Message objects directly into Pydantic classes. The generated models inherit Pydantic's validation rules and are compatible with both Pydantic V1 and V2.

The package supports multiple validation rule sets including proto-gen-validate, and allows customization through template configuration. It depends on pydantic and protobuf at runtime, making integration straightforward for projects already using either library. The plugin mode generates files with a _p2p.py suffix, keeping generated code separate from hand-written code.

Use it for

  • Generate type-safe Pydantic models from existing .proto schemas to avoid manual dataclass duplication and keep definitions synchronized.
  • Add Pydantic validation to Protobuf messages in gRPC services without rewriting message definitions.
  • Convert Protobuf validation rules into Pydantic field constraints during code generation.
  • Dynamically instantiate Pydantic models from Protobuf Message objects at runtime for serialization or API responses.
  • Maintain a single source of truth for message schemas across Protobuf and Python codebases with automatic synchronization.

Worth the install?

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

Worth it

Yes.

The package solves a real friction point—keeping Protobuf schemas and Pydantic models in sync—with low install overhead, active maintenance, permissive licensing, and no known vulnerabilities. It supports Python 3.7 through 3.12 and integrates cleanly into existing protoc workflows. Install it if your project uses both protobuf and pydantic and you want to avoid hand-maintaining duplicate message definitions.

Install

protobuf-to-pydantic on PyPI

Before you install

Low friction install with just pydantic and protobuf as runtime dependencies. Repository is active with a recent commit on 2026-06-07 and 148 stars; last release was 433 days ago, suggesting stable maintenance rather than rapid iteration.

Plugin mode requires mypy-protobuf as an additional dependency; protoc or grpc_tools must be available in your environment.

License in practice

Licensed under Apache Software License, a permissive license that allows commercial and private use with minimal restrictions, making it safe to adopt in most projects.

Quickstart

pip install protobuf_to_pydantic

# Plugin mode (recommended):
python -m grpc_tools.protoc -I. --protobuf-to-pydantic_out=. example.proto

# Runtime mode:
from protobuf_to_pydantic import message_to_pydantic

Verify before relying

  • Exact scope of proto-gen-validate compatibility and which validation rules are currently supported versus planned.
  • Whether template customization is documented with concrete examples beyond the configuration file structure shown.
  • Performance characteristics when converting large or deeply nested Protobuf schemas.
  • Specific API surface and function names available in runtime mode for instantiating Pydantic models from protobuf messages.

Package facts

LicenseApache Software License permissive
Python supportSupports the current Python release <4.0,>=3.7
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
pydanticprotobuf
MaintenanceActively maintained 433 days since the last release
Last repo commit
First released
Downloads520,804 / month, #6,208 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
License :: Other/Proprietary LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: protobuf_to_pydantic-0.3.3.1-py3-none-any.whl

Tags

Capabilities
protobuf to pydantic conversiongenerate pydantic models from protoprotoc plugin for pydanticproto3 validation with pydanticprotobuf schema to python modelsruntime protobuf to pydanticproto message validation
Topics
code-generationprotobufschema-validation

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 › “protobuf to pydantic conversion”

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 mypy-protobuf · aristaproto · hatch-protobuf · betterproto · setuptools-protobuf · pbspark · proto-schema-parser · betterproto-fw · sigstore-models · sigstore-protobuf-specs