Python Configuration Options
This section details the available configuration options for the Python SDK. All configuration is managed in the gen.yaml
file under the python
section.
Version and general configuration
Description and URLs
Different package and module names
You can configure a different name for the PyPI package and the module users will import from:
This can be useful when you want the package name to follow PyPI conventions (using hyphens) but the module name to follow Python conventions (using underscores).
Additional dependencies
Method and parameter management
Security configuration
Import management
Import paths
Error and response handling
Async method configuration
The asyncMode
setting provides two patterns for handling async operations:
Method-based (both
, default): Every operation has two methods - a synchronous version and an asynchronous version with an _async
suffix.
Constructor-based (split
): Separate constructors for synchronous and asynchronous clients. All method names are identical between sync and async versions.
The constructor-based pattern eliminates method name duplication and provides clearer IDE suggestions.
Breaking change
Switching to asyncMode: split
is a breaking change. Existing SDK users will need to update their code to use the new constructor pattern.
Server-sent events configuration
Pytest configuration
Fix flags
Last updated on