{"id":3152,"library":"mypy-boto3-support","title":"mypy-boto3-support","description":"mypy-boto3-support provides type annotations for the AWS boto3 Support service. It enhances static type checking for boto3 clients, resources, and various response/request structures related to AWS Support. The current version is 1.42.3, and its releases are frequently tied to new `boto3` versions and `mypy-boto3-builder` updates, ensuring up-to-date type definitions.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["mypy","boto3","type-hints","aws","stubs","support"],"install":[{"cmd":"pip install mypy-boto3-support","lang":"bash","label":"Install service stubs"},{"cmd":"pip install boto3 mypy-boto3-support","lang":"bash","label":"Install boto3 with stubs"}],"dependencies":[{"reason":"Provides runtime functionality that these stubs type-check.","package":"boto3"}],"imports":[{"note":"Type stubs are imported from `mypy_boto3_support`, not directly from `boto3`. Use TYPE_CHECKING guard.","wrong":"from boto3.client import SupportClient","symbol":"SupportClient","correct":"from mypy_boto3_support.client import SupportClient"},{"note":"TypeDefs for responses/requests are specific to the stub package, not directly from boto3.","wrong":"from boto3.support.type_defs import DescribeCasesResponseTypeDef","symbol":"DescribeCasesResponseTypeDef","correct":"from mypy_boto3_support.type_defs import DescribeCasesResponseTypeDef"}],"quickstart":{"code":"import boto3\nfrom typing import TYPE_CHECKING\n\n# The mypy-boto3-support package provides stubs for boto3's 'support' service.\n# The actual runtime client comes from boto3.\n\nif TYPE_CHECKING:\n    from mypy_boto3_support.client import SupportClient\n    from mypy_boto3_support.type_defs import DescribeCasesResponseTypeDef\n\ndef get_aws_support_cases() -> None:\n    # mypy will use the stubs to type-check this client\n    client: SupportClient = boto3.client(\"support\")\n    \n    # Example: Describe cases. Replace with actual parameters if needed.\n    # Using try-except for a more robust example, as actual AWS calls require credentials.\n    try:\n        response: DescribeCasesResponseTypeDef = client.describe_cases(displayId='case-000000000001')\n        print(f\"Successfully described cases. Cases found: {len(response.get('cases', []))}\")\n        if response.get('cases'):\n            print(f\"First case ID: {response['cases'][0]['caseId']}\")\n    except Exception as e:\n        print(f\"Error describing cases: {e}\")\n        print(\"Ensure you have AWS credentials configured and the 'support' service is enabled.\")\n\nif __name__ == \"__main__\":\n    get_aws_support_cases()","lang":"python","description":"This example demonstrates how to use `boto3` with `mypy-boto3-support` for type-hinted AWS Support service calls. The `TYPE_CHECKING` block ensures that type-specific imports are only active during static analysis, avoiding runtime import issues."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer.","message":"Support for Python 3.8 was removed starting with `mypy-boto3-builder` version 8.12.0. All generated `mypy-boto3-*` packages, including `mypy-boto3-support`, now require Python >=3.9.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.12.0 (and dependent mypy-boto3-* packages)"},{"fix":"Ensure `mypy` is configured to automatically discover installed stub packages. Explicit `MYPYPATH` settings might need adjustment if they previously pointed to non-PEP 561 layouts.","message":"All `mypy-boto3-*` packages, including `mypy-boto3-support`, migrated to PEP 561 (PyTyped) packages with `mypy-boto3-builder` 8.12.0. This might affect advanced build setups or explicit `MYPYPATH` configurations.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.12.0 (and dependent mypy-boto3-* packages)"},{"fix":"Update your type hints to use the new, shorter TypeDef names as per the latest stub definitions. Refer to the generated `.pyi` files for correct names.","message":"TypeDef naming conventions changed in `mypy-boto3-builder` 8.9.0. Some TypeDefs for packed method arguments now use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`). Conflicting `Extra` postfixes also moved.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.9.0 (and dependent mypy-boto3-* packages)"},{"fix":"Continue using `import boto3` for runtime code. Only import specific type annotations (e.g., `SupportClient`, `ResponseTypeDefs`) from `mypy_boto3_support` within a `if TYPE_CHECKING:` block.","message":"The `mypy-boto3-support` package provides *type stubs* for static analysis, not runtime implementations. You should still import and use `boto3` for actual AWS API calls. The stub package enhances type checking for your `boto3` usage.","severity":"gotcha","affected_versions":"All versions"},{"fix":"If a service stub package you use suddenly disappears or fails, check the `mypy-boto3-builder` release notes for service deprecations or renames. Migrate to the new service stub if applicable.","message":"Specific AWS services may be deprecated or renamed by AWS, leading to changes in the corresponding `mypy-boto3-*` stub packages. For example, `sms-voice` was excluded from builds in `mypy-boto3-builder` 8.11.0, replaced by `pinpoint-sms-voice`.","severity":"deprecated","affected_versions":"mypy-boto3-builder >=8.11.0 (for affected services)"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}