python-betterproto
python-betterproto copied to clipboard
Clean, modern, Python 3.6+ code generator & library for Protobuf 3 and async gRPC
I'm using 2.0.0b5. The following file results in broken python: ```proto syntax = "proto3"; package experiment; import "google/protobuf/empty.proto"; message Reply { bool happy = 1; } service Testcase { rpc...
## Summary Use more 3.7+ features in the library and make everything type check. This also adds support for using the union operator for python 3.10+ for Union/Optional ## Checklist...
### Summary from .google import protobuf which doesn't exist ### Reproduction Steps I’m facing an issue with the imported packages, my protofile has some import like this: ``` syntax =...
## Summary PLACEHOLDER is a specific instance of a sentinel object, the test here should be identity instead of equality, i.e. "is not" instead of "!=" I am experimenting with...
## Summary - Fixed broken relative imports for output types generation - Added possibility to generate interfaces for folder containing subfolders of .proto files - Refactored get_directories to return only...
## Summary Follows #551. This currently fails, as expected, since `dump()` is not correctly specialized for `Struct`. This is a work in progress. ## Checklist - [x] If code changes...
Removed the parts of the example that showed accessing an unset value, as it now raises an `AttributeError`, and added an example of the `match` way of accessing the attributes....
## Is your feature request related to a problem? Please describe. I'm currently using betterproto to generate Pydantic models for my FastAPI application. However, FastAPI is unable to properly serialize...
The issue affects both relative imports and google.protobuf imports, but is not 100% reproducible. My working theory is that for service method input types `output_package.imports` sometimes populates too late to...
### Summary When compiling a proto file which references well known types, `protoc` should generate the line `import betterproto.lib.google.protobuf as betterproto_lib_google_protobuf`. This does not happen in the following edge case....