Skip to content

Commit 244fc4c

Browse files
docs(readme): minor updates (#187)
1 parent 50b32f7 commit 244fc4c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ Functionality between the synchronous and asynchronous clients is otherwise iden
5656

5757
## Using types
5858

59-
Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev), which provide helper methods for things like serializing back into JSON ([v1](https://docs.pydantic.dev/1.10/usage/models/), [v2](https://docs.pydantic.dev/latest/usage/serialization/)). To get a dictionary, call `model.model_dump()`.
59+
Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev), which provide helper methods for things like:
60+
61+
- Serializing back into JSON, `model.model_dump_json(indent=2, exclude_unset=True)`
62+
- Converting to a dictionary, `model.model_dump(exclude_unset=True)`
6063

6164
Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.
6265

0 commit comments

Comments
 (0)