Skip to content

Generate code using the API. #638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
LL-Ling opened this issue Oct 30, 2024 · 2 comments
Closed

Generate code using the API. #638

LL-Ling opened this issue Oct 30, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@LL-Ling
Copy link

LL-Ling commented Oct 30, 2024

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

@LL-Ling LL-Ling added the enhancement New feature or request label Oct 30, 2024
@Gobot1234
Copy link
Collaborator

This is fixed by #165

@LL-Ling
Copy link
Author

LL-Ling commented Oct 30, 2024

This is fixed by #165

Thank you very much; using protobuf_parser has solved my problem very well.

@LL-Ling LL-Ling closed this as completed Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants