Skip to content

Commit c4a4e34

Browse files
docs: revise readme docs about nested params (#161)
1 parent 298eb9c commit c4a4e34

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,25 @@ for datasource in first_page.items:
134134
# Remove `await` for non-async usage.
135135
```
136136

137+
## Nested params
138+
139+
Nested parameters are dictionaries, typed using `TypedDict`, for example:
140+
141+
```python
142+
from asktable import Asktable
143+
144+
client = Asktable()
145+
146+
response = client.sys.projects.api_keys.create_token(
147+
project_id="project_id",
148+
chat_role={
149+
"role_id": "1",
150+
"role_variables": {"id": "42"},
151+
},
152+
)
153+
print(response.chat_role)
154+
```
155+
137156
## File uploads
138157

139158
Request parameters that correspond to file uploads can be passed as `bytes`, a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.

0 commit comments

Comments
 (0)