Skip to content

Commit 08b9e69

Browse files
docs: revise readme docs about nested params (#77)
1 parent 1a07fee commit 08b9e69

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,23 @@ for entry in first_page.entries:
145145
# Remove `await` for non-async usage.
146146
```
147147

148+
## Nested params
149+
150+
Nested parameters are dictionaries, typed using `TypedDict`, for example:
151+
152+
```python
153+
from codex import Codex
154+
155+
client = Codex()
156+
157+
project_return_schema = client.projects.create(
158+
config={"max_distance": 0},
159+
name="name",
160+
organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
161+
)
162+
print(project_return_schema.config)
163+
```
164+
148165
## Handling errors
149166

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

0 commit comments

Comments
 (0)