Skip to content

Commit 6fd9612

Browse files
committed
Doc updates, version bump for release
1 parent ba520f8 commit 6fd9612

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ This project aims to provide an improved experience when using Protobuf / gRPC i
1010
- Enums
1111
- Dataclasses
1212
- `async`/`await`
13+
- Timezone-aware `datetime` and `timedelta` objects
1314
- Relative imports
1415
- Mypy type checking
1516

@@ -34,6 +35,8 @@ This project exists because I am unhappy with the state of the official Google p
3435
- Much code looks like C++ or Java ported 1:1 to Python
3536
- Capitalized function names like `HasField()` and `SerializeToString()`
3637
- Uses `SerializeToString()` rather than the built-in `__bytes__()`
38+
- Special wrapped types don't use Python's `None`
39+
- Timestamp/duration types don't use Python's built-in `datetime` module
3740

3841
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.
3942

@@ -168,6 +171,12 @@ Both serializing and parsing are supported to/from JSON and Python dictionaries
168171
- Dicts: `Message().to_dict()`, `Message().from_dict(...)`
169172
- JSON: `Message().to_json()`, `Message().from_json(...)`
170173

174+
For compatibility the default is to convert field names to `camelCase`. You can control this behavior by passing a casing value, e.g:
175+
176+
```py
177+
>>> MyMessage().to_dict(casing=betterproto.Casing.SNAKE)
178+
```
179+
171180
### Determining if a message was sent
172181

173182
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.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="betterproto",
5-
version="1.0.1",
5+
version="1.1.0",
66
description="A better Protobuf / gRPC generator & library",
77
long_description=open("README.md", "r").read(),
88
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)