pub fn generate_python_protobuf(
schema: &ProtobufSchema,
target: &ProtobufTarget,
) -> Result<String>Expand description
Generate Python Protobuf code from a schema
Parses the Protobuf schema and generates complete Python code with message definitions, service clients, and server stubs based on the target specification.
§Arguments
schema- Parsed Protobuf schematarget- Generation target specifying what to generate:ProtobufTarget::All- Complete code: messages, services, and utilitiesProtobufTarget::Messages- Message definitions onlyProtobufTarget::Services- Service clients and stubs only
§Returns
Generated Python code as a String, or an anyhow::Error if generation fails.