Doc updates, version bump for release
This commit is contained in:
parent
ba520f88a4
commit
6fd9612ee1
@ -10,6 +10,7 @@ This project aims to provide an improved experience when using Protobuf / gRPC i
|
|||||||
- Enums
|
- Enums
|
||||||
- Dataclasses
|
- Dataclasses
|
||||||
- `async`/`await`
|
- `async`/`await`
|
||||||
|
- Timezone-aware `datetime` and `timedelta` objects
|
||||||
- Relative imports
|
- Relative imports
|
||||||
- Mypy type checking
|
- Mypy type checking
|
||||||
|
|
||||||
@ -34,6 +35,8 @@ This project exists because I am unhappy with the state of the official Google p
|
|||||||
- Much code looks like C++ or Java ported 1:1 to Python
|
- Much code looks like C++ or Java ported 1:1 to Python
|
||||||
- Capitalized function names like `HasField()` and `SerializeToString()`
|
- Capitalized function names like `HasField()` and `SerializeToString()`
|
||||||
- Uses `SerializeToString()` rather than the built-in `__bytes__()`
|
- Uses `SerializeToString()` rather than the built-in `__bytes__()`
|
||||||
|
- Special wrapped types don't use Python's `None`
|
||||||
|
- Timestamp/duration types don't use Python's built-in `datetime` module
|
||||||
|
|
||||||
This project is a reimplementation from the ground up focused on idiomatic modern Python to help fix some of the above. While it may not be a 1:1 drop-in replacement due to changed method names and call patterns, the wire format is identical.
|
This project is a reimplementation from the ground up focused on idiomatic modern Python to help fix some of the above. While it may not be a 1:1 drop-in replacement due to changed method names and call patterns, the wire format is identical.
|
||||||
|
|
||||||
@ -168,6 +171,12 @@ Both serializing and parsing are supported to/from JSON and Python dictionaries
|
|||||||
- Dicts: `Message().to_dict()`, `Message().from_dict(...)`
|
- Dicts: `Message().to_dict()`, `Message().from_dict(...)`
|
||||||
- JSON: `Message().to_json()`, `Message().from_json(...)`
|
- JSON: `Message().to_json()`, `Message().from_json(...)`
|
||||||
|
|
||||||
|
For compatibility the default is to convert field names to `camelCase`. You can control this behavior by passing a casing value, e.g:
|
||||||
|
|
||||||
|
```py
|
||||||
|
>>> MyMessage().to_dict(casing=betterproto.Casing.SNAKE)
|
||||||
|
```
|
||||||
|
|
||||||
### Determining if a message was sent
|
### Determining if a message was sent
|
||||||
|
|
||||||
Sometimes it is useful to be able to determine whether a message has been sent on the wire. This is how the Google wrapper types work to let you know whether a value is unset, set as the default (zero value), or set as something else, for example.
|
Sometimes it is useful to be able to determine whether a message has been sent on the wire. This is how the Google wrapper types work to let you know whether a value is unset, set as the default (zero value), or set as something else, for example.
|
||||||
|
2
setup.py
2
setup.py
@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="betterproto",
|
name="betterproto",
|
||||||
version="1.0.1",
|
version="1.1.0",
|
||||||
description="A better Protobuf / gRPC generator & library",
|
description="A better Protobuf / gRPC generator & library",
|
||||||
long_description=open("README.md", "r").read(),
|
long_description=open("README.md", "r").read(),
|
||||||
long_description_content_type="text/markdown",
|
long_description_content_type="text/markdown",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user