Skip to content

Generate code using the API. #638

Closed
Closed
@LL-Ling

Description

@LL-Ling

Summary

I want to use the API to generate code instead of generating it through a plugin

What is the feature request for?

The core library

The Problem

Currently, I see that betterproto only offers a plugin-based generation method.
data = b"" request = CodeGeneratorRequest() request.parse(data)
I have read the source code and need to construct the byte stream data for data, which is very difficult for me. Could you provide a simpler method for generating code using the API?

The Ideal Solution

such:
output = generate_code_with_proto(proto_file: Path)

The Current Solution

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions