python-betterproto
python-betterproto copied to clipboard
Clean, modern, Python 3.6+ code generator & library for Protobuf 3 and async gRPC
During the investigation of this great library, me and my team faced a bug which is most likely coming from python special ability to fail in datetime covnverting to timestamp...
Pydantic dataclasses are a drop-in replacement for builtin dataclasses to offer a stronger type validation. This PR adds support for generating pydantic dataclasses instead of the builtin variant. This enable...
In no particular order: - [Remove abc.ABC as base class for Message](https://github.com/danielgtaylor/python-betterproto/commit/d968aedce661d3bda8d6238bd89408334da02d7e) - after asking there was no reason for this, saves a bit of Message type creation time -...
Hi there, thanks for the great project! My environment: betterproto: v2.0.0b3 python: v3.8.5 OS: Ubuntu 20.04 I use `deprecated` option in a message definition. betterproto generates a `warnings.warn` properly, but...
The function `_get_field_default_gen` checks if a field's type is a datetime using `t is datetime`, which means if freezegun is being used in a test it generates the wrong default...
## Summary Removes any enum class name prefixes from enum members. NONE -> NONE ARITHMETIC_OPERATOR_NONE -> NONE ## Checklist - [x] If code changes were made then they have been...
 json = program.to_json() '{"sdkVersion": "Python 1.0.0", "head": {"usingQRegList": [0, 1, 2], "usingCRegList": [0, 1]}}' If I use to_dict,I need to use include_default_values. If I don't use include_default_values, it miss...
Hi, I find the output structure from the compiler a bit odd, it makes it not possible to build a proto package split across multiple files. Why is this? In...
A continuation of #273 containing a reimplementation of betterproto.Enum (with 3.11+ features) as an open set along with some tests for this. Closes #291 Closes #157 Closes #169
If [PEP 681](https://www.python.org/dev/peps/pep-0681) is accepted we would be able to simplify the generated code by removing the dataclasses decorator and then implictly make `betterproto.Message`s be dataclasses by defining `__init_subclass__` and...