mypy-boto3-ssm-guiconnect Type Annotations
mypy-boto3-ssm-guiconnect provides comprehensive type annotations for the AWS SSM GUIConnect service, designed to be used with `boto3`. It enables static analysis tools like `mypy` to perform rigorous type checking on `boto3` calls related to SSM GUIConnect resources, enhancing code reliability. The library is automatically generated by `mypy-boto3-builder` and its version (currently 1.42.3) synchronizes with `boto3`'s service definitions, with frequent updates.
Warnings
- breaking Beginning with `mypy-boto3-builder` 8.12.0 (which generated `mypy-boto3-ssm-guiconnect` 1.42.x and newer), Python 3.8 is no longer supported. Projects using these stubs must upgrade their Python environment.
- breaking If upgrading from `mypy-boto3-ssm-guiconnect` versions generated by `mypy-boto3-builder` older than 8.9.0 (roughly prior to `mypy-boto3-ssm-guiconnect` 1.36.0), explicit references to `TypeDef` names might break. The builder introduced naming convention changes (e.g., shorter names, `Extra` postfix moved) for consistency.
- gotcha Always import client types and other type definitions directly from the `mypy_boto3_ssm_guiconnect` package or its submodules (e.g., `from mypy_boto3_ssm_guiconnect import SSMGUIConnectClient`). Do not attempt to import type definitions or client types from the `boto3` package itself, as `boto3` does not provide its own type stubs.
Install
-
pip install mypy-boto3-ssm-guiconnect
Imports
- SSMGUIConnectClient
from mypy_boto3_ssm_guiconnect import SSMGUIConnectClient
- SSMGUIConnectServiceName
from mypy_boto3_ssm_guiconnect import SSMGUIConnectServiceName
- DescribeConnectionsResponseTypeDef
from mypy_boto3_ssm_guiconnect.type_defs import DescribeConnectionsResponseTypeDef
Quickstart
import boto3
from mypy_boto3_ssm_guiconnect import SSMGUIConnectClient
from typing import TYPE_CHECKING
# --- Type Checking (only active during static analysis) ---
if TYPE_CHECKING:
# Define the client with its specific type annotation
# Mypy will use the stubs from mypy-boto3-ssm-guiconnect to validate calls.
client: SSMGUIConnectClient = boto3.client("ssm-guiconnect")
# Example of type-checking an attribute access.
# For SSM GUIConnect, direct public API methods might be less common,
# but the client object itself is fully type-hinted.
_ = client.meta.service_model
# --- Runtime Code (executes normally) ---
# The actual boto3 client is created and used as usual.
real_client = boto3.client("ssm-guiconnect")
print(f"Boto3 SSM GUIConnect client created: {real_client.__class__.__name__}")
# Add actual runtime interactions here if applicable for your use case.
# Example: try:
# response = real_client.some_ssm_guiconnect_method()
# print(response)
# except Exception as e:
# print(f"Error during SSM GUIConnect call: {e}")