python-betterproto
python-betterproto copied to clipboard
Clean, modern, Python 3.6+ code generator & library for Protobuf 3 and async gRPC
I would like to use betterproto for the generation of code from proto messages but without the usage of gRPC. However, there are still services defined in my .proto files...
Good day, assuming I have `d = {'date_of_birth': datetime.datetime(2000)}` and a `proto` including `date_of_birth: Timestamp`: When `proto.from_dict(d)` is called, it assumes the value of date_of_birth is an ISO string and...
Custom options are a vanilla proto feature documented [here](https://developers.google.com/protocol-buffers/docs/proto#customoptions). I personally have a use case for them to apply constraints, similar to [protoc-gen-validate](https://github.com/envoyproxy/protoc-gen-validate). I think supporting generic custom options would...
Thanks for all of your work on betterproto, it's been immensely helpful. What is betterproto's canonical way of enforcing Protobuf `oneof`s are only set to one variant? From this demo-protobuf:...
Currently, betterproto does not understand Any messages, except that they have a url and bytes. If you have suggestions for extended support, please be welcome to make them here.
Setup: ``` ❯ tree . ├── Content.proto ├── Detection.proto └── lib 1 directory, 2 files ``` Content.proto ``` syntax = "proto3"; package My.Content; import "Detection.proto"; message Content { enum Type...
According to the [Style Guide](https://developers.google.com/protocol-buffers/docs/style#enums), protobuf enums should have the enum name as a prefix for all enum values, to avoid naming conflicts in languages like C, where all values...
We had some issues loosing a zero-duration. Currently, if a serialized Protobuf message contains a 0-duration like `myDuration` in this example: ```protobuf syntax = "proto3"; message Some { string someField...
It is not possible to set `timeout`s in generated `ServiceStubs`. I believe betterproto supports timeouts since #32 but it seems like the code generation does not implement timeouts. [Here](https://github.com/qria/python-betterproto/tree/feature/add-timeout) is...
When using the to_dict method of a message, integer fields are converted to strings. This can be see on [this line](https://github.com/danielgtaylor/python-betterproto/blob/ce9f492f506af347e2e4f54c33077b3f579d19bb/betterproto/__init__.py#L763) in the source code. Why are integers converted to...