python-betterproto
python-betterproto copied to clipboard
Clean, modern, Python 3.6+ code generator & library for Protobuf 3 and async gRPC
I'd love to use `grpclib.server.Stream` directly instead of `request_iterator/yield` combination to handle stream/steram gRPC server. For example, the current way is a bit tricky to write consumer/producer style while `yield`...
Hi, I switched to betterproto from the vanilla Google protoc plugin for Python. So far I am really happy with the generated API and the benefits that come with it....
Hi, Enums seem not to be mapped on init and receive and left as their integer values. Example proto: ``` message TestRequest { Category category = 1; } enum Category...
Currently there is a single plugin with limited support for generating gRPC client code, and there is demand to cover servicer generation #19, with grpclib or grpcio, or none #44...
I am not sure if I am wrong here but when executing this: ```python from dataclasses import dataclass import betterproto @dataclass class Inner(betterproto.Message): inner1: str = betterproto.string_field(1) inner2: str =...
Encoding errors while sending aren't thrown because the sending task is started as fire and forget
Hey there, I've incorrectly passed a string instead of a message to a grpc field. This will result in an exception which is thrown during encoding in the `__bytes__` method...
Given a file like... ``` import "badger/mushroom"; package badger.snake; message Snake { badger.mushroom.Mushroom mushroom = ...; } ``` This results in compiling a `badger/snake.py` which includes the line `from .badger...
Given ```protobuf syntax = "proto3"; message MessageA { repeated float field_a = 1; } message MessageB { repeated MessageA field_b = 1; } ``` When ```python3 s = MessageB(field_b=[MessageA()]).SerializeToString() ```...
data = bytes(circuitLine) ret = PBCircuitLine().parse(data) # type: 'PBCircuitLine' circuitLine:  ret: 
oneof op { FixedGate fixedGate = 1; RotationGate rotationGate = 2; CustomizedGate customizedGate = 3; CompositeGate compositeGate = 4; string procedureName = 5; Measure measure = 6; bool barrier =...