{"id":6729,"library":"mypy-boto3-connecthealth","title":"mypy-boto3-connecthealth","description":"mypy-boto3-connecthealth provides static type annotations for the `boto3` AWS SDK's ConnectHealth service. Generated with `mypy-boto3-builder` (version 8.12.0 for the current package version), it enhances developer experience by enabling comprehensive type checking, improved IDE auto-completion, and early error detection for `boto3` code interacting with AWS ConnectHealth. The library is actively maintained with frequent updates reflecting `boto3` releases and new AWS services.","status":"active","version":"1.42.62","language":"python","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["aws","boto3","mypy","type-stubs","connecthealth","types","static-analysis"],"install":[{"cmd":"pip install mypy-boto3-connecthealth boto3","lang":"bash","label":"Install with boto3 runtime"},{"cmd":"pip install 'boto3-stubs[connecthealth]' boto3","lang":"bash","label":"Install via boto3-stubs meta-package"}],"dependencies":[{"reason":"Runtime dependency for interacting with AWS services.","package":"boto3","optional":false},{"reason":"Static type checker to utilize the provided type annotations.","package":"mypy","optional":true}],"imports":[{"symbol":"ConnectHealthClient","correct":"from mypy_boto3_connecthealth.client import ConnectHealthClient"},{"symbol":"DescribeEventsPaginator","correct":"from mypy_boto3_connecthealth.paginator import DescribeEventsPaginator"},{"symbol":"EventTypeDef","correct":"from mypy_boto3_connecthealth.type_defs import EventTypeDef"}],"quickstart":{"code":"from typing import TYPE_CHECKING\nimport boto3\nimport os\n\nif TYPE_CHECKING:\n    from mypy_boto3_connecthealth.client import ConnectHealthClient\n    from mypy_boto3_connecthealth.type_defs import EventTypeDef\n\n\ndef get_connect_health_events(region_name: str) -> list[\"EventTypeDef\"]:\n    # boto3 client creation without explicit type hint will still work\n    # but explicit type hints provide better IDE support and type checking\n    client: ConnectHealthClient = boto3.client(\n        \"connect-health\",\n        region_name=region_name,\n        aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', ''),\n        aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', ''),\n        aws_session_token=os.environ.get('AWS_SESSION_TOKEN', '')\n    )\n\n    # Example: Describe events (Connect Health operations might require specific permissions)\n    try:\n        response = client.describe_events(\n            Filter={\n                'EventType': {'Values': ['AWS_HEALTH_EVENT']}\n            }\n        )\n        return response['Events']\n    except client.exceptions.InvalidRequestException as e:\n        print(f\"Error describing events: {e}\")\n        return []\n\nif __name__ == \"__main__\":\n    events = get_connect_health_events(\"us-east-1\")\n    print(f\"Found {len(events)} Connect Health events.\")\n    for event in events:\n        print(f\"  - Event ARN: {event['eventArn']}\")\n","lang":"python","description":"This quickstart demonstrates how to initialize a `boto3` ConnectHealth client with type annotations and fetch events. It includes explicit type hints for `ConnectHealthClient` and `EventTypeDef` to leverage static analysis. Ensure `boto3` is installed alongside `mypy-boto3-connecthealth`."},"warnings":[{"fix":"Upgrade your Python environment to version 3.9 or newer.","message":"Support for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0 (November 2025). This affects all generated `mypy-boto3` stub packages, including `mypy-boto3-connecthealth` versions 1.42.x and newer. Projects using Python 3.8 or older will encounter compatibility issues.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0, mypy-boto3-connecthealth >= 1.42.x"},{"fix":"Review your codebase for explicit `TypeDef` annotations and update them to reflect the new naming conventions, consulting the `mypy_boto3_connecthealth.type_defs` module for the correct names.","message":"Type definition (TypeDef) naming conventions changed in `mypy-boto3-builder` version 8.9.0 (November 2025). Type definition names for method arguments and conflicting types may have been shortened or rearranged (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`). This could break existing explicit type annotations in your codebase that referenced the old names.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.9.0, mypy-boto3-connecthealth >= 1.42.x (packages generated with 8.9.0+)"},{"fix":"Always ensure `boto3` is installed in your runtime environment (e.g., `pip install boto3`).","message":"`mypy-boto3-connecthealth` is a stub-only package and does not include the actual `boto3` runtime. Your application must have `boto3` installed to function at runtime. The type stubs are solely for static analysis.","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 compliant 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, mypy-boto3-connecthealth >= 1.42.x"},{"fix":"Wrap your `from mypy_boto3_SERVICE import ...` statements in `if TYPE_CHECKING:` blocks.","message":"For optimal performance and to avoid runtime dependencies, 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 and are not treated as runtime dependencies.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Consider installing the `boto3-stubs-lite` version (e.g., `pip install 'boto3-stubs-lite[connecthealth]'`) which is more RAM-friendly but requires explicit type annotations. Alternatively, disable PyCharm's internal type checker and use `mypy` or `pyright` instead.","message":"PyCharm users might experience slow performance and high CPU usage due to a known issue with Literal overloads (issue PY-40997) when using `boto3-stubs`.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'8.12.0':28 'activ':62 'analysi':84 'annot':12 'auto':46 'auto-complet':45 'aw':16,57,72,74 'boto3':3,7,15,25,53,68,75 'builder':26 'check':42 'code':54 'complet':47 'comprehens':40 'connecthealth':4,8,19,58,80 'current':31 'detect':51 'develop':36 'earli':49 'enabl':39 'enhanc':35 'error':50 'experi':37 'frequent':65 'generat':21 'ide':44 'improv':43 'interact':55 'librari':60 'maintain':63 'mypi':2,6,24,76 'mypy-boto3-builder':23 'mypy-boto3-connecthealth':1,5 'new':71 'packag':32 'provid':9 'reflect':67 'releas':69 'sdk':17 'servic':20,73 'static':10,83 'static-analysi':82 'stub':79 'type':11,41,78,81 'type-stub':77 'updat':66 'version':27,33","created_at":"2026-04-15T18:40:27.481119+00:00","updated_at":"2026-04-16T16:52:28.699122+00:00","problems":{"verify_error":"error: Failed to parse: `mypy-boto3-connecthealth boto3`\n  Caused by: Expected one of `@`, `(`, `<`, `=`, `>`, `~`, `!`, `;`, found `b`\nmypy-boto3-connecthealth boto3\n                         ^"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.43.27","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_connecthealth/","changelog":null,"pypi":"https://pypi.org/project/mypy-boto3-connecthealth/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["type-stubs","aws"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"install_fail","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-05","install_tag":null}}