The new Python SDK is now available in beta. You can generate it today using the APIMatic CLI. Try it out and share your feedback with us.
What's New?
- Redesigned Core Architecture: Single-orchestrator pipeline with dedicated, fully decoupled components for auth, resilience, serialization, and error handling
- Predictable Endpoint Structure: Every endpoint maps directly to its HTTP call, making the full request lifecycle visible and predictable across all methods
- Type-Safe Models: Models are fully type-annotated, so optionality and presence contracts are enforced by your type checker and surfaced by your editor instead of showing up at runtime
- Per-Endpoint Typed Errors: Each endpoint exposes its own exception type, fully navigable in the IDE without consulting documentation
- Broad Runtime Compatibility: Ships as a standard,
pip-installable package with both synchronous and asynchronous clients
Generating the SDK
The apimatic sdk generate command supports two flags for selecting the code generator version and stability level:
| Flag | Options | Description |
|---|---|---|
--codegen-version | v3 (default), v4 | Version of the code generator to use. |
--stability | stable (default), beta | Stability level of the generated SDK. |
Pass --codegen-version=v4 and --stability=beta to generate the new SDK:
apimatic sdk generate --language=python --codegen-version=v4 --stability=beta
note
v4 beta is currently available for C#, Python, and TypeScript. While the --codegen-version and --stability flags are accepted for all languages, using --codegen-version=v4 with any other language will result in a generation error.