python-betterproto
python-betterproto copied to clipboard
Clean, modern, Python 3.6+ code generator & library for Protobuf 3 and async gRPC
when i use `to_dict` or `to_pydict` function to serialize message, `False` and `0` values are not work for boolean and integer fields. here is the sample code: ```python3 from dataclasses...
## Steps to reproduce ### Install `betterproto-2.0.0b5` + tooling: ```bash pip install --pre betterproto[compiler] pip install grpcio-tools ``` other versions: > grpcio==1.50.0 grpcio-tools==1.50.0 grpclib==0.4.3 ### Create an `example.proto` ```proto syntax...
C++ and Java implementations of protocol buffers have support for [writing and reading multiple messages](https://protobuf.dev/programming-guides/techniques/#streaming) via `CodedOutputStream` and `CodedInputStream` . This is also space-efficient because the size of each message...
Currently, it generates the following: ```py # Generated by the protocol buffer compiler. DO NOT EDIT! # sources: example.proto # plugin: python-betterproto from dataclasses import dataclass import betterproto @dataclass class...
I'm on Python 3.9.9, using `betterproto==2.0.0b5`. On the generated code, it uses `typing.List`, and sometimes does `List["FooBar"]` if `FooBar` hasn't already been defined. This does work. I do, however, use...
Hello, We are using betterproto with the NI-XNET gRPC Server. (For Reference: https://github.com/ni/grpc-device) They use some messages which have a field with name "str". This causes a RecursionError on import...
This looks like a great project, thank you! A few questions: 1. For an existing, largely Google [grpcio](https://grpc.io/docs/languages/python/generated-code/) based codebase — how does support look like? For example, the generated...
So I was testing this out with [national instrument's grpc-device](https://github.com/ni/grpc-device) and it works pretty well so thank you however I have noticed that once in a while 2 endpoints/destinations are...
Hi there! Thanks for creating and maintaining this package -- I'm currently looking into integrating protobuf messages into one of the Python projects I work on, and this looks like...
I have a field in a message that is a very small timedelta (initialized with `timedelta(microseconds=11)`). When converting this to JSON using the `to_dict` method, I end-up with the value...