From 45d76b8712210a037e5ac1632d83642ab0fc005c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Mar 2025 10:45:23 +0000 Subject: [PATCH] docs: revise readme docs about nested params --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 7a4f2e12..95452e72 100644 --- a/README.md +++ b/README.md @@ -145,6 +145,23 @@ for entry in first_page.entries: # Remove `await` for non-async usage. ``` +## Nested params + +Nested parameters are dictionaries, typed using `TypedDict`, for example: + +```python +from codex import Codex + +client = Codex() + +project_return_schema = client.projects.create( + config={"max_distance": 0}, + name="name", + organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", +) +print(project_return_schema.config) +``` + ## Handling errors When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `codex.APIConnectionError` is raised.