Registry / type-stubs / mypy-boto3-health

mypy-boto3-health

JSON →
library1.43.0pypypi✓ verified 22d ago

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-health
INSTALL
IMPORT
SIG · MYPY-BOTO3-HEALTH
M
mypy-boto3-health
type-stubspythonv1.43.0
Install
1.7s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

HealthClient
from mypy_boto3_health.client import HealthClient
from mypy_boto3_health import HealthClient
HealthServiceResource
from mypy_boto3_health import HealthServiceResource
ServiceResource
from mypy_boto3_health.service_resource import ServiceResource

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.

import boto3 from mypy_boto3_health.client import HealthClient from mypy_boto3_health.type_defs import DescribeEventsResponseTypeDef import os # Instantiate a typed Boto3 Health client # Ensure AWS_REGION is set in your environment or passed explicitly region = os.environ.get("AWS_REGION", "us-east-1") health_client: HealthClient = boto3.client("health", region_name=region) print(f"Fetching health events in {region}...") try: # Use a typed method and receive a typed response response: DescribeEventsResponseTypeDef = health_client.describe_events( filter={ "eventStatusCodes": ["open"], } ) events = response.get("events", []) if events: print(f"Found {len(events)} open health events:") for event in events: print(f" Event ARN: {event['eventArn']}, Type: {event['eventTypeCategory']}") else: print("No open health events found.") except Exception as e: print(f"An error occurred: {e}")
Debug
Known issues
breakingPython 3.8 support has been removed across all `mypy-boto3` packages, and all packages have migrated to PEP 561. This may require upgrading your Python environment and reviewing how stubs are resolved by your type checker.
fix
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.
affects: >=8.12.0
breakingTypeDef naming conventions changed for packed method arguments and conflict resolution. This primarily impacts users relying on specific TypeDef names for complex input/output structures within the stubs.
fix
Review your code for any direct references to `CreateDistributionRequestRequestTypeDef` (now `CreateDistributionRequestTypeDef`) or `CreateDistributionExtraRequestTypeDef` (now `CreateDistributionRequestExtraTypeDef`) and similar patterns, and update them accordingly.
affects: >=8.9.0
gotchaThis package provides *only* type annotations. You must install `boto3` separately for your application to actually interact with AWS services at runtime.
fix
Ensure `pip install boto3` is part of your project's dependencies alongside `mypy-boto3-health`.
affects: All versions
gotchaAWS service names and their corresponding `mypy-boto3` package names can sometimes change or be deprecated (e.g., `sms-voice` replaced by `pinpoint-sms-voice`). Ensure you are using the correct and most up-to-date service name.
fix
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.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides the actual AWS SDK runtime; mypy-boto3-health only provides type hints for it.
mypyoptionalThe static type checker that utilizes these type annotations.
Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
mypy-boto3-health — pip install mypy-boto3-health · libregistry