Registry /
type-stubs / mypy-boto3-ssm-incidents
Install & Compatibility
Where this runs
tested against v1.43.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.606s · 52MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 3.8s · import 0.554s · 52MB
50MB installed
● package 50MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
SSMIncidentsClient
✓ from mypy_boto3_ssm_incidents import SSMIncidentsClient
GetIncidentRecordOutputTypeDef
✓ from mypy_boto3_ssm_incidents.type_defs import GetIncidentRecordOutputTypeDef
This quickstart demonstrates how to use `mypy-boto3-ssm-incidents` for type-hinting a boto3 SSM Incidents client. It shows the use of `TYPE_CHECKING` to guard stub imports and provides an example API call with inferred types.
import os
import boto3
from typing import TYPE_CHECKING
# These imports are only for type checking purposes.
# They are ignored at runtime if TYPE_CHECKING is False.
if TYPE_CHECKING:
from mypy_boto3_ssm_incidents import SSMIncidentsClient
from mypy_boto3_ssm_incidents.type_defs import GetIncidentRecordOutputTypeDef
# Initialize the boto3 client at runtime
# Ensure AWS credentials are configured (e.g., via environment variables or ~/.aws/credentials)
client: 'SSMIncidentsClient' = boto3.client(
"ssm-incidents",
region_name=os.environ.get("AWS_REGION", "us-east-1")
)
# Example API call with type hints
try:
# Use a dummy ARN for demonstration; replace with a valid one if you have it
incident_arn = "arn:aws:ssm-incidents::123456789012:incident-record/example-incident"
response: 'GetIncidentRecordOutputTypeDef' = client.get_incident_record(
incidentRecordArn=incident_arn
)
print(f"Incident found: {response['incidentRecord']['title']}")
except client.exceptions.ResourceNotFoundException:
print(f"Incident record '{incident_arn}' not found (as expected for example ARN).")
except Exception as e:
print(f"An error occurred: {e}")
print("Type checking setup successful!")
Debug
Known issues
breakingPython 3.8 is no longer supported by `mypy-boto3-builder` and consequently by `mypy-boto3` packages generated with it.fixUpgrade your Python environment to version 3.9 or newer.
affects: mypy-boto3-builder >= 8.12.0 (and generated `mypy-boto3` packages like `mypy-boto3-ssm-incidents` >= 1.42.3)
breaking`mypy-boto3` packages migrated to PEP 561. This change affects how MyPy locates and uses the stubs.fixEnsure your `mypy` configuration is up-to-date and compatible with PEP 561 packages. Update MyPy if necessary.
affects: mypy-boto3-builder >= 8.12.0 (and generated `mypy-boto3` packages)
gotchaType stub imports (`from mypy_boto3_ssm_incidents import ...`) should always be wrapped in an `if TYPE_CHECKING:` block.fixWrap all `mypy-boto3` specific imports within `if TYPE_CHECKING: ...` to prevent runtime import errors if the stub package is not installed as a direct runtime dependency.
affects: All versions
gotcha`mypy-boto3-ssm-incidents` provides *only* type annotations. The actual `boto3` library must be installed separately for your code to run.fixAlways ensure `boto3` is included in your project's runtime dependencies (`pip install boto3`).
affects: All versions
breakingTypeDef naming conventions changed in earlier `mypy-boto3-builder` versions, impacting how some specific TypeDefs are named (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`).fixWhen upgrading `mypy-boto3` packages across major builder versions, review your code for explicit `from ...type_defs import ...` imports and adjust TypeDef names if they no longer match the generated stubs.
affects: mypy-boto3-builder >= 8.9.0 (and generated `mypy-boto3` packages)
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredThis package provides type stubs for boto3. boto3 itself must be installed to run the code.
mypyoptionalmypy is required to perform static type checking on your code using these stubs.