Registry / type-stubs / mypy-boto3-mgn

mypy-boto3-mgn

JSON →
library1.43.30pypypi✓ verified 22d ago

mypy-boto3-mgn provides type annotations for the AWS Migration Hub rehost service (MGN) within `boto3`. It enhances development with static type checking for clients, paginators, waiters, literals, and type definitions, compatible with tools like mypy, pyright, VSCode, and PyCharm. The package is automatically generated by `mypy-boto3-builder` and is frequently updated to align with `boto3` releases.

pip install mypy-boto3-mgn
INSTALL
IMPORT
SIG · MYPY-BOTO3-MGN
M
mypy-boto3-mgn
type-stubspythonv1.43.30
Install
3.3s avg
Import
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 20.2MB
glibc
py 3.103.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.
fix
Upgrade 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`).
fix
Review 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).
fix
Consider 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.
fix
Wrap `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.
Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
mypy-boto3-mgn — pip install mypy-boto3-mgn · libregistry