{"id":3065,"library":"mypy-boto3-connectcases","title":"mypy-boto3-connectcases","description":"mypy-boto3-connectcases provides comprehensive type annotations for the `boto3` AWS ConnectCases service, ensuring type safety and improved developer experience when working with AWS SDK for Python. It is generated by `mypy-boto3-builder` and currently stands at version 1.42.74, with a frequent release cadence tied to upstream `boto3` updates and `mypy-boto3-builder` enhancements.","status":"active","version":"1.42.74","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","mypy","type-stubs","aws","connectcases","type-checking"],"install":[{"cmd":"pip install mypy-boto3-connectcases","lang":"bash","label":"Install type stubs"},{"cmd":"pip install boto3","lang":"bash","label":"Install runtime dependency"}],"dependencies":[{"reason":"Provides the actual runtime client for AWS services that these stubs type-annotate.","package":"boto3","optional":false},{"reason":"May be used internally for compatibility with older Python versions, automatically managed by builder.","package":"typing-extensions","optional":true}],"imports":[{"note":"For explicit type annotations of the boto3 client object. Most specific types are in submodules.","wrong":"from mypy_boto3_connectcases import ConnectCasesClient","symbol":"ConnectCasesClient","correct":"from mypy_boto3_connectcases.client import ConnectCasesClient"},{"note":"For specific input/output TypedDicts. These are typically located in `type_defs`.","wrong":"from mypy_boto3_connectcases.client import ListDomainsResponseTypeDef","symbol":"ListDomainsResponseTypeDef","correct":"from mypy_boto3_connectcases.type_defs import ListDomainsResponseTypeDef"},{"note":"mypy-boto3-* packages provide type hints, not runtime functionality. Always import 'boto3' for runtime code.","wrong":"import mypy_boto3_connectcases as boto3","symbol":"boto3","correct":"import boto3"}],"quickstart":{"code":"import boto3\nfrom typing import TYPE_CHECKING\n\n# These imports are only for type checking, they won't be used at runtime\nif TYPE_CHECKING:\n    from mypy_boto3_connectcases.client import ConnectCasesClient\n    from mypy_boto3_connectcases.type_defs import ListDomainsResponseTypeDef\n\ndef get_connect_cases_domains() -> 'ListDomainsResponseTypeDef':\n    # boto3 client creation is type-hinted by mypy-boto3-connectcases\n    client: ConnectCasesClient = boto3.client(\"connectcases\")\n    \n    # Example operation with type-hinted methods and response\n    response = client.list_domains()\n    print(\"Connect Cases Domains found:\")\n    for domain in response.get(\"domains\", []):\n        print(f\"- Domain ARN: {domain.get('domainArn')}, Domain ID: {domain.get('domainId')}\")\n    return response\n\nif __name__ == \"__main__\":\n    try:\n        # Ensure AWS credentials are configured (e.g., via ~/.aws/credentials or env vars)\n        result = get_connect_cases_domains()\n    except Exception as e:\n        print(f\"Error interacting with AWS Connect Cases: {e}\")\n        print(\"Please ensure AWS credentials are set up and the 'connectcases' service is available in your region.\")","lang":"python","description":"This quickstart demonstrates how to use `boto3` with `mypy-boto3-connectcases` for type hinting. The `TYPE_CHECKING` block ensures that type-specific imports are only active during static analysis by `mypy`, preventing runtime errors. The `boto3.client` call benefits from the provided type annotations, improving code completion and error detection."},"warnings":[{"fix":"Upgrade your Python environment to version 3.9 or higher.","message":"Python 3.8 support has been removed across all `mypy-boto3-*` packages, including `mypy-boto3-connectcases`.","severity":"breaking","affected_versions":">=8.12.0"},{"fix":"Ensure `mypy` is updated to a recent version. If issues arise, re-evaluate your `mypy` configuration, especially `mypy_path` or `plugins` settings.","message":"All `mypy-boto3-*` packages have migrated to PEP 561, potentially affecting how type checkers discover packages if custom `mypy` configurations were relying on older mechanisms.","severity":"breaking","affected_versions":">=8.12.0"},{"fix":"Do not attempt to instantiate classes or call methods directly from `mypy_boto3_connectcases`. It is purely for static analysis.","message":"This package provides *only* type stubs. It does not contain any runtime code or functionality. Always use `import boto3` for actual AWS SDK operations.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Review your code for any direct imports of `ResponseTypeDef` or `RequestTypeDef` and adjust their names according to the latest package structure. Consult the specific service's `mypy-boto3` documentation for exact type names.","message":"TypeDef names have undergone changes in recent versions (e.g., `CreateDistributionRequestRequestTypeDef` to `CreateDistributionRequestTypeDef`), which can break code explicitly importing and using these `TypedDict` definitions.","severity":"breaking","affected_versions":">=8.9.0"},{"fix":"Always verify the correct service name in the official `boto3` documentation or `mypy-boto3` stubs if you encounter `UnknownServiceError` or `mypy` errors related to service client types.","message":"AWS service names used in `boto3.client()` calls are case-sensitive and may change or be deprecated (e.g., `sms-voice` was replaced by `pinpoint-sms-voice`). Ensure you use the correct, current service name string.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}