{"id":3639,"library":"mypy-boto3-migrationhuborchestrator","title":"mypy-boto3-migrationhuborchestrator Type Annotations","description":"mypy-boto3-migrationhuborchestrator provides type annotations for the `boto3` AWS Migration Hub Orchestrator service, enhancing static analysis and IDE autocompletion for Python projects. It is generated by the `mypy-boto3-builder` and is currently at version 1.42.3, with releases closely tracking `boto3` updates to ensure compatibility and comprehensive type coverage.","status":"active","version":"1.42.3","language":"python","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["mypy","boto3","aws","typing","type-stubs","migrationhuborchestrator"],"install":[{"cmd":"pip install mypy-boto3-migrationhuborchestrator","lang":"bash","label":"Install specific service stubs"},{"cmd":"pip install 'boto3-stubs[migrationhuborchestrator]'","lang":"bash","label":"Install via boto3-stubs meta-package"}],"dependencies":[{"reason":"Runtime dependency for actual AWS interactions.","package":"boto3"},{"reason":"The static type checker that utilizes these annotations.","package":"mypy","optional":true}],"imports":[{"note":"It is best practice to guard type imports with `if TYPE_CHECKING:` to avoid introducing runtime dependencies.","symbol":"MigrationHubOrchestratorClient","correct":"from typing import TYPE_CHECKING\nif TYPE_CHECKING:\n    from mypy_boto3_migrationhuborchestrator import MigrationHubOrchestratorClient"},{"note":"Type definitions (TypedDicts) for API responses are available in the `type_defs` submodule.","symbol":"TemplateSummaryTypeDef","correct":"from typing import TYPE_CHECKING\nif TYPE_CHECKING:\n    from mypy_boto3_migrationhuborchestrator.type_defs import TemplateSummaryTypeDef"}],"quickstart":{"code":"import boto3\nfrom typing import TYPE_CHECKING\n\n# Best practice: guard type imports with if TYPE_CHECKING\nif TYPE_CHECKING:\n    from mypy_boto3_migrationhuborchestrator import MigrationHubOrchestratorClient\n    from mypy_boto3_migrationhuborchestrator.type_defs import TemplateSummaryTypeDef\n\n# Initialize a boto3 client for Migration Hub Orchestrator\nclient: MigrationHubOrchestratorClient = boto3.client('migrationhuborchestrator')\n\n# Use a method and check its return type\ntry:\n    response = client.list_templates(maxResults=5)\n    templates: list[TemplateSummaryTypeDef] = response['Templates']\n    for template in templates:\n        print(f\"Template ID: {template['Id']}, Name: {template['Name']}\")\nexcept client.exceptions.AccessDeniedException:\n    print(\"Access denied. Please check your AWS credentials and permissions.\")\nexcept Exception as e:\n    print(f\"An unexpected error occurred: {e}\")\n\n# To run mypy:\n# 1. pip install mypy boto3 mypy-boto3-migrationhuborchestrator\n# 2. mypy your_script_name.py","lang":"python","description":"This quickstart demonstrates how to use the `mypy-boto3-migrationhuborchestrator` stubs with a `boto3` client to get type-checking for the `list_templates` operation. It includes the recommended `TYPE_CHECKING` guard for imports and handles potential `AccessDeniedException`."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer.","message":"Starting with `mypy-boto3-builder` version 8.12.0 (which generated this package), Python 3.8 is no longer supported for generated stub packages.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0 (and dependent stub packages like this one)"},{"fix":"Update your code to use the new `TypeDef` names as per the latest stub documentation. Your IDE or type checker should flag these if you are using explicit type hints.","message":"In `mypy-boto3-builder` version 8.9.0, type definition (TypeDef) naming conventions changed. This includes shorter names for packed method arguments and revised postfix handling for conflicting `TypeDef` names (e.g., `CreateDistributionExtraRequestTypeDef` became `CreateDistributionRequestExtraTypeDef`).","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.9.0 (and dependent stub packages)"},{"fix":"Wrap your `from mypy_boto3_* import ...` statements in `if TYPE_CHECKING:` blocks. For example: `from typing import TYPE_CHECKING; if TYPE_CHECKING: from mypy_boto3_migrationhuborchestrator import MigrationHubOrchestratorClient`.","message":"Type imports from `mypy_boto3_*` packages should ideally be placed within `if TYPE_CHECKING:` blocks. This ensures that these stub packages are only used by static analysis tools (like mypy) and are not treated as runtime dependencies by your application, reducing the deployed package size.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Update your type checker (e.g., `pip install --upgrade mypy`) and ensure it's configured to recognize PEP 561-compliant stub packages.","message":"Following the migration to PEP 561 packages in `mypy-boto3-builder` 8.12.0, ensure your `mypy` or other type checker is up-to-date. Older versions might not correctly discover or utilize the stubs, leading to `Missing type stub` errors or incorrect type inference.","severity":"gotcha","affected_versions":"mypy-boto3-builder >= 8.12.0 (and dependent stub packages)"}],"env_vars":null,"search_vec":"'1.42.3':45 'analysi':24 'annot':6,13 'autocomplet':27 'aw':17,61 'boto3':3,9,16,38,50,60 'builder':39 'close':48 'compat':54 'comprehens':56 'coverag':58 'current':42 'enhanc':22 'ensur':53 'generat':33 'hub':19 'ide':26 'migrat':18 'migrationhuborchestr':4,10,66 'mypi':2,8,37,59 'mypy-boto3-builder':36 'mypy-boto3-migrationhuborchestrator':1,7 'orchestr':20 'project':30 'provid':11 'python':29 'releas':47 'servic':21 'static':23 'stub':65 'track':49 'type':5,12,57,62,64 'type-stub':63 'updat':51 'version':44","created_at":"2026-04-11T17:38:16.246229+00:00","updated_at":"2026-04-16T17:05:22.070516+00:00","problems":[{"fix":"Install the package using pip: `pip install mypy-boto3-migrationhuborchestrator`","cause":"The `mypy-boto3-migrationhuborchestrator` package has not been installed in your Python environment.","error":"ModuleNotFoundError: No module named 'mypy_boto3_migrationhuborchestrator'"},{"fix":"Ensure your type checker is up-to-date (`pip install --upgrade mypy`) and correctly configured to discover PEP 561-compliant stub packages. Also, verify the package is installed in the environment being checked.","cause":"Your type checker (e.g., mypy or pyright) cannot find the installed type stubs, possibly due to an outdated type checker or incorrect configuration.","error":"Missing type stub for \"mypy_boto3_migrationhuborchestrator\" (reportMissingModuleStubs)"},{"fix":"Wrap your type imports in a `if TYPE_CHECKING:` block, and for runtime use, ensure `boto3` is used directly or provide a runtime-compatible fallback. For example: `from typing import TYPE_CHECKING; if TYPE_CHECKING: from mypy_boto3_migrationhuborchestrator import MigrationHubOrchestratorClient`.","cause":"Type imports from `mypy_boto3_*` packages are typically guarded by `if TYPE_CHECKING:` to avoid runtime dependencies, making them unavailable at runtime if not handled appropriately.","error":"NameError: name 'MigrationHubOrchestratorClient' is not defined"},{"fix":"Update your code to use the new `TypeDef` names. Consult the latest stub documentation for the correct naming conventions, which your IDE or type checker should also flag if you are using explicit type hints. For instance, `CreateDistributionExtraRequestTypeDef` became `CreateDistributionRequestExtraTypeDef` in a general example for the builder.","cause":"This error occurs because of a breaking change in `mypy-boto3-builder` version 8.9.0, which revised the naming conventions for `TypeDef` (TypedDict) objects, meaning older names are no longer recognized.","error":"error: Name 'OldMigrationHubOrchestratorTypeDef' is not defined"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.43.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/youtype/mypy_boto3_builder","docs":"https://youtype.github.io/boto3_stubs_docs/mypy_boto3_migrationhuborchestrator/","changelog":null,"pypi":"https://pypi.org/project/mypy-boto3-migrationhuborchestrator/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["type-stubs","aws"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-29","next_check":"2026-07-28","install_tag":null}}