Registry / type-stubs / mypy-boto3-migrationhub-config

mypy-boto3-migrationhub-config

JSON →
library1.43.0pypypi✓ verified 22d ago

Provides type annotations for the `boto3` AWS Migration Hub Config service, enhancing static analysis with tools like MyPy, VSCode, and PyCharm. It helps with code completion, argument checking, and catching potential runtime errors at development time. The current version is 1.42.3, generated with `mypy-boto3-builder 8.12.0`, and it follows the release cadence of `boto3`.

pip install mypy-boto3-migrationhub-config boto3 mypy
INSTALL
IMPORT
SIG · MYPY-BOTO3-MIGRATI
M
mypy-boto3-migrationhub-config
type-stubspythonv1.43.0
Install
6.0s avg
Import
579ms
Disk
114MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.616s · 116.4MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 6.0s · import 0.542s · 114MB
114MB installed
● package 114MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MigrationHubConfigClient
from mypy_boto3_migrationhub_config.client import MigrationHubConfigClient
from mypy_boto3_migrationhub_config import MigrationHubConfigClient
Client types are nested under the '.client' submodule.
GetHomeRegionResultTypeDef
from mypy_boto3_migrationhub_config.type_defs import GetHomeRegionResultTypeDef
from mypy_boto3_migrationhub_config.client import GetHomeRegionResultTypeDef
Type definition objects (TypedDicts) are typically found in the '.type_defs' submodule.

This quickstart demonstrates how to instantiate a typed `MigrationHubConfigClient` and use it to retrieve the Migration Hub home region. It includes explicit type hints for `boto3.client` and for the response type, which is crucial for full static analysis and IDE autocomplete. Ensure `boto3` and `mypy-boto3-migrationhub-config` are installed, and AWS credentials are configured.

import boto3 from typing import TYPE_CHECKING, Dict, Any from os import environ if TYPE_CHECKING: from mypy_boto3_migrationhub_config.client import MigrationHubConfigClient from mypy_boto3_migrationhub_config.type_defs import GetHomeRegionResultTypeDef def get_migrationhub_config_client() -> "MigrationHubConfigClient": """ Returns a typed MigrationHubConfig client. """ region = environ.get("AWS_REGION", "us-east-1") # Default region if not set client: "MigrationHubConfigClient" = boto3.client("migrationhub-config", region_name=region) return client def describe_current_home_region(): """ Describes the current Migration Hub home region. """ client = get_migrationhub_config_client() try: response: "GetHomeRegionResultTypeDef" = client.get_home_region() home_region = response.get("HomeRegion") print(f"Current Migration Hub Home Region: {home_region}") return home_region except client.exceptions.AccessDeniedException: print("Access Denied: Ensure your AWS credentials are configured and have permissions for migrationhub-config:GetHomeRegion.") return None except Exception as e: print(f"An unexpected error occurred: {e}") return None if __name__ == "__main__": # Set AWS credentials and region via environment variables (e.g., AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION) # or AWS CLI configuration before running. print("Attempting to retrieve Migration Hub Home Region...") describe_current_home_region()
Debug
Known issues
breakingSupport for Python 3.8 has been removed in `mypy-boto3-builder` version 8.12.0 and subsequent package releases. Users on Python 3.8 must upgrade their Python version to 3.9 or newer.
fix
Upgrade Python environment to 3.9 or later.
affects: >=8.12.0 of mypy-boto3-builder (used to generate 1.42.3+)
gotchaThese packages provide type stubs for boto3; `boto3` itself must be installed separately for runtime functionality. Failing to install `boto3` will result in runtime `ModuleNotFoundError`.
fix
Ensure `boto3` is installed alongside `mypy-boto3-migrationhub-config` using `pip install boto3`.
affects: All versions
gotchaFor optimal static analysis and IDE autocomplete (especially in VSCode), explicitly type the `boto3.client()` call with the imported client type (e.g., `client: MigrationHubConfigClient = boto3.client(...)`). Implicit typing may not provide full benefits.
fix
Add explicit type annotations to `boto3.client()` and `boto3.resource()` calls, and for method return values where appropriate.
affects: All versions
breakingIn `mypy-boto3-builder` 8.9.0, there were changes to how TypeDef names for packed method arguments are generated (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). If you were explicitly importing and using such TypeDefs, their names might have changed.
fix
Review your code for any explicit `TypeDef` imports and adjust names if they were affected by the shortening or postfix reordering rules.
affects: >=8.9.0 of mypy-boto3-builder (used to generate 1.42.3+)
gotchaUsing these type stubs with linters like Pylint or Flake8 can sometimes lead to 'undefined variable' or 'unused import' warnings when `TYPE_CHECKING` guards are not used. These stubs are only for static analysis, not runtime.
fix
Wrap type stub imports and type aliases in `if TYPE_CHECKING:` blocks to make them conditional for type checkers only, avoiding linter warnings for runtime code.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime dependency for AWS SDK functionality.
mypyrequiredStatic type checker for which these stubs are provided.
pythonrequiredMinimum required Python version.
Agent activity
12 hits · last 30 days
node
8
OpenAI (training)
2
Resources
mypy-boto3-migrationhub-config — pip install mypy-boto3-migrationhub-config · libregistry