mypy-boto3-health provides type annotations (stubs) for the AWS Boto3 Health service. It enables static type checking with tools like MyPy, improving code quality and catching potential errors for applications interacting with AWS Health. The library is actively maintained and releases frequently, often in sync with new `boto3` versions or `mypy-boto3-builder` updates.
pip install mypy-boto3-healthVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to obtain a typed Boto3 Health client and use its methods with full type hint support. It includes an example of calling `describe_events` and accessing the typed response.
Upgrade your Python environment to 3.9 or newer. Ensure your type checker (e.g., MyPy) is configured to correctly find PEP 561-compliant packages.
Review your code for any direct references to `CreateDistributionRequestRequestTypeDef` (now `CreateDistributionRequestTypeDef`) or `CreateDistributionExtraRequestTypeDef` (now `CreateDistributionRequestExtraTypeDef`) and similar patterns, and update them accordingly.
Ensure `pip install boto3` is part of your project's dependencies alongside `mypy-boto3-health`.
Periodically check the official AWS documentation and `mypy-boto3` release notes for changes in service names or preferred alternatives. If a service package seems outdated, verify if a newer or renamed package exists.