Type annotations for boto3 SystemsManagerQuickSetup service
mypy-boto3-ssm-quicksetup provides type annotations for the `boto3` Systems Manager Quick Setup (SSM Quick Setup) service client, enabling static type checking with tools like `mypy` and enhancing IDE auto-completion. This package is part of the `mypy-boto3-builder` ecosystem, which generates stubs for all `boto3` services. It is currently at version 1.42.3 and generally aligns its major version with the corresponding `boto3` release, while the `mypy-boto3-builder` itself has its own release cadence.
Warnings
- breaking Python 3.8 support was removed in `mypy-boto3-builder` version 8.12.0. All generated stub packages, including `mypy-boto3-ssm-quicksetup`, now require Python 3.9 or newer.
- breaking The `mypy-boto3-builder` migrated to PEP 561 compliant packages in version 8.12.0. While largely backward compatible, older type-checking setups or custom build processes might need adjustments.
- breaking Type definition naming conventions changed in `mypy-boto3-builder` 8.9.0. Some TypeDefs for method arguments might have shorter names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes moved to the end.
- gotcha For optimal IDE support (especially PyCharm) and auto-discovery of types without explicit annotations, it is generally recommended to install the umbrella package `boto3-stubs` with the service extra (e.g., `pip install 'boto3-stubs[ssm-quicksetup]'`). Standalone packages like `mypy-boto3-ssm-quicksetup` often require explicit type annotations for `boto3.client()` calls.
- gotcha PyCharm users might experience slow performance with `Literal` overloads. It is sometimes recommended to use `boto3-stubs-lite` (which sacrifices some overload information for performance) or to disable PyCharm's internal type checker and rely on external tools like `mypy` or `pyright`.
- deprecated The old naming convention `mypy-boto3-*` is considered legacy. The `mypy-boto3` package itself has been deprecated in favor of `types-boto3`. While `mypy-boto3-ssm-quicksetup` still exists, new projects might prefer `types-boto3` with service extras for consistency.
Install
-
pip install mypy-boto3-ssm-quicksetup boto3 -
pip install 'boto3-stubs[ssm-quicksetup]' boto3
Imports
- SystemsManagerQuickSetupClient
from mypy_boto3_ssm_quicksetup.client import SystemsManagerQuickSetupClient
- CreateQuickSetupTypeDef
from mypy_boto3_ssm_quicksetup.type_defs import CreateQuickSetupTypeDef
Quickstart
import boto3
from boto3.session import Session
from mypy_boto3_ssm_quicksetup.client import SystemsManagerQuickSetupClient
from mypy_boto3_ssm_quicksetup.type_defs import ListQuickSetupActionsResponseTypeDef
def get_ssm_quicksetup_client() -> SystemsManagerQuickSetupClient:
"""Returns a type-hinted SSM Quick Setup client."""
session: Session = boto3.session.Session()
client: SystemsManagerQuickSetupClient = session.client("ssm-quicksetup")
return client
if __name__ == "__main__":
ssm_qs_client = get_ssm_quicksetup_client()
# Example: List Quick Setup Actions (dummy call for demonstration)
# In a real scenario, you would provide actual parameters.
try:
response: ListQuickSetupActionsResponseTypeDef = ssm_qs_client.list_quick_setup_actions()
print("Successfully retrieved Quick Setup actions (type-checked).")
# print(response)
except Exception as e:
print(f"An error occurred: {e}")