Install & Compatibility
Where this runs
tested against v1.43.30 · 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.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 20.2MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 3.3s · import 0.000s · 21MB
18MB installed
● package 18MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
MgnClient
✓ from mypy_boto3_mgn import MgnClient
✗ from mypy_boto3_mgn import MgnClient
This example demonstrates how to initialize an MGN client with type annotations and make a sample API call (`list_waves`). It also shows how to type-hint the response using a generated TypeDef. The `TYPE_CHECKING` block ensures that `mypy-boto3-mgn` is only a development dependency.
import boto3
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from mypy_boto3_mgn import MgnClient
from mypy_boto3_mgn.type_defs import ListWavesResponseTypeDef
# Instantiate the boto3 client with type hinting
client: MgnClient = boto3.client("mgn")
try:
# Example API call with typed response
response: ListWavesResponseTypeDef = client.list_waves(
maxResults=10
)
print("Successfully listed waves:")
for wave in response.get("items", []):
print(f" - Wave ID: {wave.get('waveID')}, Name: {wave.get('name')}")
except client.exceptions.ResourceNotFoundException:
print("No waves found or region misconfigured.")
except Exception as e:
print(f"An error occurred: {e}")
Debug
Known issues
breakingPython 3.8 support has been removed in `mypy-boto3-builder` version 8.12.0 and later. Projects using `mypy-boto3-mgn` now require Python 3.9 or higher.fixUpgrade your Python environment to 3.9 or newer. If stuck on Python 3.8, you might need to pin to an older `mypy-boto3-builder` or `mypy-boto3-mgn` version (e.g., `<8.12.0` for builder).
affects: >=8.12.0 (builder), all mypy-boto3-mgn versions generated thereafter
breakingBreaking changes to `TypeDef` naming conventions occurred in `mypy-boto3-builder` version 8.9.0. Some TypeDefs for method arguments or conflicting names might have been shortened or had postfixes rearranged (e.g., `*RequestRequestTypeDef` to `*RequestTypeDef`).fixReview your type hints for `boto3` API call parameters and responses. Adjust `TypeDef` imports and usage according to the new naming conventions. Consult the specific service documentation or generated stub files if you encounter `NameError` for `TypeDef`s.
affects: >=8.9.0 (builder), all mypy-boto3-mgn versions generated thereafter
gotchaPyCharm users may experience slow performance or high CPU usage due to `Literal` overloads. This is a known upstream issue (PY-40997).fixConsider using `boto3-stubs-lite` (if explicit type annotations are acceptable) or disable PyCharm's built-in type checker in favor of `mypy` or `pyright` for linting.
affects: All versions, specific to PyCharm IDE
gotchaFor production deployments, `mypy-boto3-mgn` should typically be a development-only dependency. To prevent runtime import errors or `pylint` complaints about undefined variables, use `if TYPE_CHECKING:` blocks.fixWrap `mypy-boto3-mgn` imports within `from typing import TYPE_CHECKING; if TYPE_CHECKING:` blocks. Alternatively, for non-`TYPE_CHECKING` contexts, assign imported types to `object`.
affects: All versions
Upgrade
Version history
1.43.30latest on PyPI · released Jun 15, 2026
Audit
Dependencies
boto3requiredProvides the underlying AWS SDK for Python that these type stubs annotate.
pythonrequiredRequires Python 3.9 or higher due to recent removal of Python 3.8 support.