Python SDK Ergonomic Improvement
We improved the Python SDK to return Pydantic-based response values which
allows for using the
This is slightly more concise than the previous version, which used the
syntax to access response values.
Previously, you had to use the
 syntax to access response values. This
required a little more code for every property access.
_10response = client.store.place_order(quantity=1000)_10print(response.body["order_id"])
With Pydantic-based response values, you can use the
. syntax to access. This
is slightly less verbose and looks more Pythonic.
_10response = client.store.place_order(quantity=1000)_10print(response.order_id)
Notice how there is also no need to use the
body attribute to access the
response body. All new Python SDKs will be using this new syntax.
We will not be updating previously generated Python SDKs to use this new syntax to ensure backwards compatibility.
Non-SDK Snippets in API Portal
The API Reference page now generates non-SDK code snippets for cURL and other languages that do not have an SDK. This allows developers to quickly generate, copy, and paste code snippets regardless of whether or not there is an SDK for your language.