From 3698941198a0d105ab422e96ad1f72cbc9e4cf4c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 9 Mar 2025 22:19:53 +0000 Subject: [PATCH] chore(internal): codegen related update --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 7038aeea594..cc749f84b0d 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,23 @@ for account in first_page.result: # Remove `await` for non-async usage. ``` +## Nested params + +Nested parameters are dictionaries, typed using `TypedDict`, for example: + +```python +from cloudflare import Cloudflare + +client = Cloudflare() + +account = client.accounts.create( + name="name", + type="standard", + unit={"id": "f267e341f3dd4697bd3b9f71dd96247f"}, +) +print(account.unit) +``` + ## File uploads 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)`.