Python v4 SDKs now support pagination, covering the four widely used strategies: Offset, Page, Cursor and Link based pagination. A paginated operation returns a Paginator[Page, Item] on the synchronous client and an AsyncPaginator on the asynchronous one.
43 posts tagged with "Python"
View All TagsHTTP Logging in Python v4 SDKs
Python v4 SDKs now log HTTP requests and responses through Python's standard logging module. Nothing is printed until you turn the SDK's logger on, the same way you would for any library, or set one environment variable.
Moving Python v4 SDKs to httpx 2
Python v4 SDKs now depend on httpx2 in place of httpx. The upgrade brings the SDK onto the 2.x line of its HTTP library while keeping the client surface you already use unchanged.
Configurable Retries in Python v4 SDKs
Python v4 SDKs now retry failed requests, and retrying is on by default. The client accepts a retry_options keyword that controls how many retries are made, which status codes and methods qualify, and how the backoff grows between attempts.
C#, Python and TypeScript v4 SDKs Now Generally Available
The v4 SDKs for C#, Python and TypeScript are now generally available. All three leave beta today and generate as stable SDKs from version 2.x of the APIMatic CLI.
Server-Sent Event Streaming in Python v4 SDKs (Beta)
Python v4 SDKs now stream server-sent events. An operation whose success response is text/event-stream returns an EventStream[T] typed over the event's data schema, and the asynchronous client returns an AsyncEventStream[T] you read with async for.
Discriminated Unions and Enum Defaults in Python v4 SDKs (Beta)
Python v4 SDKs now resolve discriminated unions precisely. A oneOf union or an allOf hierarchy that declares a discriminator is tagged by the wire key, so the SDK picks the right variant on the way in and writes the right tag on the way out, even when the variant model does not declare the tag field itself.
File and Binary Payloads in Python v4 SDKs (Beta)
Python v4 SDKs now handle files. An operation that uploads a binary body or a multipart/form-data form, and one that returns a binary body on success or on error, all generate with typed parameters and typed results.
README, API Reference and SDK Map in Python v4 SDKs (Beta)
Python v4 SDKs now ship their own documentation. A README.md gets a developer started, api-reference.md and raw-api-reference.md document every operation, and sdk-map.md with a page per API group is a lookup index of the whole package.
SDK Identification Headers and Automatic Idempotency Keys in Python v4 SDKs (Beta)
Python v4 SDKs now identify themselves on every request and protect non-idempotent calls against accidental replay, matching the behavior introduced in C# v4 SDKs in July.