Registry / type-stubs / mypy-boto3-migrationhubstrategy

mypy-boto3-migrationhubstrategy

JSON →
library1.43.0pypypi✓ verified 22d ago

mypy-boto3-migrationhubstrategy provides type annotations for the `boto3` AWS SDK's Migration Hub Strategy Recommendations service. It offers static type checking and improved IDE autocompletion for `boto3` users, ensuring code correctness and developer efficiency. The library is currently at version 1.42.3 and follows a frequent release cadence, often aligning with `boto3` updates and new AWS service features. It is generated by `mypy-boto3-builder`.

pip install boto3 mypy-boto3-migrationhubstrategy
INSTALL
IMPORT
SIG · MYPY-BOTO3-MIGRATI
M
mypy-boto3-migrationhubstrategy
type-stubspythonv1.43.0
Install
3.8s avg
Import
602ms
Disk
50MB
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.608s · 52MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.8s · import 0.596s · 52MB
50MB installed
● package 50MB
Code
Verified usage

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

MigrationHubStrategyRecommendationsClient
from mypy_boto3_migrationhubstrategy.client import MigrationHubStrategyRecommendationsClient
Import the specific client type for type hinting from the service-specific stub package.
ListApplicationComponentsResponseTypeDef
from mypy_boto3_migrationhubstrategy.type_defs import ListApplicationComponentsResponseTypeDef
Import specific TypeDefs for response and request structures for more granular type checking.
boto3.client
import boto3 from mypy_boto3_migrationhubstrategy.client import MigrationHubStrategyRecommendationsClient client: MigrationHubStrategyRecommendationsClient = boto3.client("migrationhubstrategy")
import boto3 client = boto3.client("migrationhubstrategy")
Without explicit type annotation, type checkers like MyPy cannot fully infer the client's methods and attributes, limiting autocompletion and static analysis.

This quickstart demonstrates how to initialize the Migration Hub Strategy Recommendations client with type annotations and make a basic API call. It explicitly types the `boto3` client and the API response, enabling static type checking and enhanced IDE features. The code requires `boto3` and AWS credentials to run successfully.

import boto3 import os from mypy_boto3_migrationhubstrategy.client import MigrationHubStrategyRecommendationsClient from mypy_boto3_migrationhubstrategy.type_defs import ListApplicationComponentsResponseTypeDef def get_application_components() -> ListApplicationComponentsResponseTypeDef: # Ensure AWS credentials are configured (e.g., via environment variables, ~/.aws/credentials) # For this example, we assume valid credentials are set up in the environment. # client: MigrationHubStrategyRecommendationsClient = boto3.client( # "migrationhubstrategy", # region_name=os.environ.get("AWS_REGION", "us-east-1") # ) # The above is correct, but for a runnable quickstart focusing on *typing*, # a minimal client creation is better without requiring full AWS setup for execution. # In a real application, you'd configure region, credentials, etc. appropriately. # Explicitly type the client for static analysis benefits client: MigrationHubStrategyRecommendationsClient = boto3.client("migrationhubstrategy") # Example API call with type-hinted response response: ListApplicationComponentsResponseTypeDef = client.list_application_components() print(f"Found {len(response.get('applicationComponentInfos', []))} application components.") for component in response.get('applicationComponentInfos', []): print(f"- {component.get('applicationComponentId')}: {component.get('applicationComponentName')}") return response if __name__ == "__main__": # This part requires actual AWS credentials for a successful run. # You might need to set AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and AWS_REGION # in your environment for this to execute without credential errors. try: get_application_components() except Exception as e: print(f"An error occurred: {e}. Please ensure AWS credentials are configured.")
Debug
Known issues
breakingSupport for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0. Users on Python 3.8 or older must upgrade their Python environment to 3.9 or newer to continue receiving updates for `mypy-boto3-*` packages, including `mypy-boto3-migrationhubstrategy`.
fix
Upgrade your Python environment to version 3.9 or newer.
affects: mypy-boto3-builder >= 8.12.0 (affecting all generated stubs)
gotchaWhen using standalone `mypy-boto3-*` packages, explicit type annotations are recommended for `boto3.client` or `session.client` calls (e.g., `client: MigrationHubStrategyRecommendationsClient = boto3.client(...)`). While type checkers might infer some types, explicit annotations ensure full autocompletion and static analysis benefits, especially when not using the larger `boto3-stubs` or `boto3-stubs-lite` packages.
fix
Always add explicit type annotations to your `boto3` client and resource objects, like `client: MigrationHubStrategyRecommendationsClient = session.client("migrationhubstrategy")`.
affects: All versions
breaking`mypy-boto3-builder` version 8.9.0 introduced breaking changes to `TypeDef` naming conventions (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). If your code directly references these generated type definitions from older stub versions, it may break upon upgrade.
fix
Update your code to reflect the new, shorter `TypeDef` names. Review your type imports and usages from `mypy_boto3_migrationhubstrategy.type_defs`.
affects: mypy-boto3-builder >= 8.9.0 (affecting all generated stubs)
gotchaAs of `mypy-boto3-builder` 8.12.0, all generated packages have migrated to PEP 561, meaning stub files are now correctly located by type checkers without special configuration. If you previously relied on `MYPYPATH` to point to manually managed stub directories, this configuration might no longer be necessary or could behave unexpectedly.
fix
Ensure your `mypy` configuration correctly discovers installed packages. Remove any redundant `MYPYPATH` entries that might interfere with PEP 561-compliant stub discovery.
affects: mypy-boto3-builder >= 8.12.0 (affecting all generated stubs)
gotchaPyCharm users may experience performance issues or high CPU usage due to how PyCharm handles `Literal` overloads in type annotations. The `mypy-boto3` project itself recommends using `boto3-stubs-lite` (or the equivalent service-specific lite package, if available) as a workaround until this PyCharm issue (PY-40997) is resolved.
fix
Consider installing `boto3-stubs-lite` or the lite version of the service stub if you experience performance problems in PyCharm. Alternatively, disable PyCharm's internal type checker and rely solely on `mypy`.
affects: All versions when used with PyCharm
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime dependency for AWS SDK functionality.
Agent activity
19 hits · last 30 days
node
16
OpenAI (training)
2
Resources
mypy-boto3-migrationhubstrategy — pip install mypy-boto3-migrationhubstrategy · libregistry