This section details the available configuration options for the Python SDK. All configuration is managed in the gen.yaml file under the python section.
The name of the module users will import from. Allows using a different name for imports than the package name. PEP 420 implicit namespace packages are supported with period (.) characters, such as speakeasy.api_client. Custom code regions will be removed by updating the ModuleName
You can configure a different name for the PyPI package and the module users will import from:
python:packageName:"my-package"# Users will install with: pip install my-packagemoduleName:"my_module"# Users will import with: from my_module import SDK
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).
Turn request parameters and body fields into a flat list of method arguments. This takes precedence over maxMethodParams. If there is no request body then maxMethodParams will be respected.
maxMethodParams
false
9999
Maximum number of parameters before an input object is generated. 0 means input objects are always used.
flatteningOrder
false
parameters-first
Determines the ordering of method arguments when flattening parameters and body fields. parameters-first or body-first
methodArguments
false
require-security-and-request
Determines how arguments for SDK methods are generated.
When value is greater than 0, installs pytest-timeout and sets the global pytest-timeout configuration value, which is the number of seconds before individual tests are timed out.