Clean, modern, Python 3.6+ code generator & library for Protobuf 3 and async gRPC
MIT License
Bot releases are hidden (Show)
Breaking: the minimum Python version has been bumped to 3.7
#444
Support generating Pydantic dataclasses. Pydantic dataclasses are are drop-in replacement for dataclasses in the standard library that additionally supports validation.
Pass --python_betterproto_opt=pydantic_dataclasses
to enable this feature. Refer to #406 and README.md for more information.
Added support for @generated
marker #382
Pull down the include_default_values
argument to to_json()
#405
Pythonize input_type name in py_input_message #436
Widen from_dict()
to accept any Mapping
#451
Replace pkg_resources
with importlib
#462
dict
encoding for timezone-aware datetimes
#468
to_pydict()
serialization for optional fields #495
Thank you to all the contributors to this release and everyone for being so patient with its release.
Full Changelog: https://github.com/danielgtaylor/python-betterproto/compare/v2.0.0b5...v.2.0.0b6
Published by Gobot1234 about 2 years ago
Breaking: Client and Service Stubs no longer pack and unpack the input message fields as parameters #331:
Update your client calls and server handlers as follows:
Clients before:
response = await service.echo(value="hello", extra_times=1)
Clients after:
response = await service.echo(EchoRequest(value="hello", extra_times=1))
Servers before:
async def echo(self, value: str, extra_times: int) -> EchoResponse: ...
Servers after:
async def echo(self, echo_request: EchoRequest) -> EchoResponse:
# Use echo_request.value
# Use echo_request.extra_times
...
Format field comments also as docstrings #304
Implement __deepcopy__
for Message
#339
Implement to/from_pydict()
for Message
#203
Run isort on compiled code #355
Expose timeout, deadline and metadata parameters from grpclib #352
Make Message.__getattribute__
invisible to type checkers #359
NotImplementedError
#325
Message.from_dict()
in the presence of optional datetime fields #329
__init__.py
#337
Message.to_dict()
mutating the underlying Message
#378
Published by Gobot1234 almost 3 years ago
Published by nat-n over 3 years ago
Published by nat-n almost 4 years ago
Published by boukeversteegh over 4 years ago
Several bugfixes and improvements required or will require small breaking changes, necessitating a new version.
2.0.0
will be released once the interface is stable.
Add support for gRPC and stream-stream #83
Switch from pipenv
to poetry
for development #75
Fix two packages with the same name suffix should not cause naming conflict #25
Fix Import child package from root #57
Fix Import child package from package #58
Fix Import parent package from child package #59
Fix Import root package from child package #60
Fix Import root package from root #61
Fix ALL_CAPS message fields are parsed incorrectly. #11
Published by nat-n over 4 years ago
Published by nat-n over 4 years ago