ITADN

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

#2308Opencjermain 创建于 2026-03-08
Feature
C
cjermaincommented
## 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](https://github.com/cjermain/protoc-gen-pydantic/releases/tag/v0.10.0). **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](https://github.com/pydantic/pydantic): ``` 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`](https://github.com/bufbuild/protovalidate) field constraints directly to Pydantic `Field()` kwargs and `AfterValidator` annotations - Generated files require Python ≥ 3.10 for `T | None` union syntax.
0 条评论