{"repo":"so1n/protobuf_to_pydantic","free":true,"listed":false,"github":"https://github.com/so1n/protobuf_to_pydantic","clone":"git clone https://github.com/so1n/protobuf_to_pydantic.git","description":"Generate a pydantic.BaseModel with parameter verification function from the Python Message object(by the Protobuf file).","language":"Python","stars":148,"topics":["grpc","protobuf","pydantic","python","proto-plugin","buf"],"license":"Apache-2.0","category":"networking-infra","readme_excerpt":"protobuf to pydantic Generate Pydantic Model or source code with parameter verification function based on Protobuf file (Proto3). 中文文档 Feature Feature： - [x] Generate source code through Protobuf plugin。 - [x] Generate Pydantic Model or source code by parsing Protobuf Message in Python runtime. - [x] Compatible with V1 and V2 versions of Pydantic 。 - [x] Supports multiple verification rules and is compatible with proto-gen-validate (subsequent versions will support the rules of proto-gen-validate 1.0)。 - [x] Support custom functionality through templates。 - [ ] Supports protovalidate verification rules（ proto-gen-validate version = 1.0） The following is a functional overview diagram of protobuf-to-pydantic . In the picture P2P represents protobuf-to-pydantic , Protoc represents the command for Protobuf to generate code, and plugin represents Plugin for Protoc : Installation By default, protobuf-to-pydantic can be installed directly via the following command: If want to use the full functionality of protobuf-to-pydantic , can install protobuf-to-pydantic with the following command:. Usage 1.code generation protobuf-to-pydantic currently has two methods to generate Pydantic Model objects based on Protobuf files.： - 1: Plugin Mode: Use the Protoc plug-in to generate the corresponding Python code file through the Protobuf file。 - 2: Runtime Mode: Generate the corresponding Pydantic Model object through the Message object in Python runtime。 1.1.Plugin Mode 1.1.0.Install dependenci","default_branch":null,"files":null,"tree":[],"storefront":"/r/so1n","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/so1n/protobuf_to_pydantic/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}