Skip to content

Plugin request for Buf Schema Registry: protoc-gen-pydantic #2308

@cjermain

Description

@cjermain

Mandatory

Where is the source code for the plugin?

https://github.com/cjermain/protoc-gen-pydantic

Optional

Does the plugin have a valid semver version?

Yes. Latest version is v0.10.0, from GitHub Releases.

Does the plugin have a dependency on another plugin?

No. The plugin generates standalone Pydantic models and does not depend on output from any other plugin (e.g., protoc-gen-python is not required).

Does the output of this plugin depend on any other external libraries?

Yes — the generated Python (≥ 3.10) files have a runtime dependency on Pydantic v2:

pydantic>=2.0

No other runtime dependencies. The plugin binary itself is a self-contained Go binary.

Additional details:

  • The plugin is a Go binary (protoc-gen-pydantic) that reads .proto descriptors and emits *_pydantic.py files — no Python runtime needed in the Docker image.
  • It translates buf.validate field constraints directly to Pydantic Field() kwargs and AfterValidator annotations
  • Generated files require Python ≥ 3.10 for T | None union syntax.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions