python-betterproto
python-betterproto copied to clipboard
Clean, modern, Python 3.6+ code generator & library for Protobuf 3 and async gRPC
According to the [Readme](https://github.com/danielgtaylor/python-betterproto/blob/master/README.md#one-of-support) it should be possible to access fields of a oneof-group by pattern matching so that static analysis tools can provide type hints: ```python3 test = Test()...
### Summary Using Pydantic creates circular imports ### Reproduction Steps Compile the following `.proto` files: `A_a.proto`: ``` syntax = "proto3"; package root.apackage; import "B.proto"; message AaMsg { root.bpackage.BMsg x =...
## Summary The representation of enums in JSON should not have the prefix removed as implemented in #187. This PR provides one option for fixing JSON representation of enums. From...
### Summary I frequently use the dictionary form of betterproto messages (`from_dict()`, `to_dict()`) with stringified enums as arguments for web endpoints and database ODMs. Having an exact type hint for...
### Summary Hello, I have a suggestion that I can probably implement myself if you agree to do it. However, I would like to have your opinion on it before...
## Summary The documentation of services and methods was not properly added to the generated files. The issue was that `ServiceCompiler` and `ServiceMethodCompiler` didn't have access to the value of...
### Summary Latency increases when using the newest version 2.0.0b7 ### Reproduction Steps This happened in a library we were using: https://github.com/cetanu/envoy_data_plane When we upgraded to betterproto 2.0.0b7 we saw...
## Summary This small PR removes a useless method. The method was initially defined in https://github.com/danielgtaylor/python-betterproto/commit/b5dcac125024c4579efc9096200a371f67c283f1 It is no longer used, is not tested, and the implementation probably depends to...
## Summary Define `__all__` in the generated files, as suggested by https://github.com/danielgtaylor/python-betterproto/issues/486 ## Checklist - [X] If code changes were made then they have been tested. - [X] This PR...
### Summary Double underscore breaks existing code ### Reproduction Steps When we try compiling the following proto-file, the field `field__json` becomes `field_json` ``` syntax = "proto3"; package test; message TestMessage...