mypy-boto3-ssm-guiconnect Type Annotations

1.42.3 · active · verified Sat Apr 11

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

Install

Imports

Quickstart

This quickstart demonstrates how to use `mypy-boto3-ssm-guiconnect` to add type hints to your `boto3` SSM GUIConnect client. The `if TYPE_CHECKING:` block is processed by `mypy` to validate method calls and attribute access, while the runtime code remains unchanged.

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}")

view raw JSON →