Registry /
type-stubs / mypy-boto3-iotanalytics
Install & Compatibility
Where this runs
tested against v1.42.3 · 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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.618s · 116.6MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 6.2s · import 0.586s · 114MB
114MB installed
● package 114MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
IoTAnalyticsClient
✓ from mypy_boto3_iotanalytics import IoTAnalyticsClient
ListChannelsResponseTypeDef
✓ from mypy_boto3_iotanalytics.type_defs import ListChannelsResponseTypeDef
boto3.client('iotanalytics')
✓ client: IoTAnalyticsClient = boto3.client('iotanalytics')
✗ client = boto3.client('iotanalytics')
While `mypy-boto3` often enables auto-discovery, explicit type annotations for `boto3.client()` calls are recommended for full IDE support and robust static analysis, especially in VSCode or with specific `mypy` configurations.
Demonstrates how to initialize an `IoTAnalyticsClient` with type hints and perform a simple operation like listing channels. Ensure `boto3` is installed and AWS credentials are configured in your environment.
import os
import boto3
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from mypy_boto3_iotanalytics import IoTAnalyticsClient
from mypy_boto3_iotanalytics.type_defs import ListChannelsResponseTypeDef
def list_iotanalytics_channels() -> "ListChannelsResponseTypeDef":
"""
Lists IoTAnalytics channels with type hints.
"""
# Ensure AWS credentials are configured (e.g., via environment variables or ~/.aws/credentials)
# The 'region_name' can also be passed here, e.g., region_name=os.environ.get('AWS_REGION', 'us-east-1')
client: "IoTAnalyticsClient" = boto3.client(
"iotanalytics",
region_name=os.environ.get('AWS_REGION', 'us-east-1')
)
print("Listing IoTAnalytics channels...")
response: "ListChannelsResponseTypeDef" = client.list_channels()
for channel in response.get("channelSummaries", []):
print(f" Channel Name: {channel.get('channelName')}")
print(f" Creation Time: {channel.get('creationTime')}")
return response
if __name__ == "__main__":
try:
# Example assumes AWS credentials are set up in the environment
# e.g., AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION
list_iotanalytics_channels()
except Exception as e:
print(f"An error occurred: {e}")
Debug
Known issues
breakingPython 3.8 is no longer supported across `mypy-boto3` packages. Projects targeting Python 3.8 will need to upgrade to Python 3.9 or newer.fixUpgrade your Python environment to 3.9 or a later version.
affects: mypy-boto3-builder >= 8.12.0
breakingThe `mypy-boto3-builder` introduced breaking changes to `TypeDef` naming conventions (e.g., shorter names, postfix changes) in version 8.9.0. This can affect existing type annotations in your code if you explicitly reference `TypeDef` names.fixReview and update `TypeDef` import paths and names in your code according to the new conventions.
affects: mypy-boto3-builder >= 8.9.0
gotchaThe `mypy-boto3` ecosystem migrated to PEP 561 packages. This might impact how packages are installed or discovered, especially in custom build environments or older package managers.fixEnsure your package management and build tools correctly handle PEP 561-compliant stub packages. For issues, consider regenerating stubs with `mypy-boto3-builder` using `uvx` if applicable.
affects: mypy-boto3-builder >= 8.12.0
gotchaPyCharm users might experience slow performance or high CPU usage due to how it handles `Literal` overloads in `mypy-boto3`. fixIt is recommended to use `boto3-stubs-lite` (if appropriate for your use case) or to disable PyCharm's built-in type checker and rely on `mypy` or `pyright` instead.
affects: All versions
gotchaWhile `mypy-boto3` aims for auto-discovery, explicit type annotations for `boto3.client()` and `boto3.resource()` calls are often necessary or recommended for full IDE auto-completion and static analysis support, especially in VSCode.fixAlways add an explicit type hint to your `boto3.client()` or `boto3.resource()` assignments, for example: `client: IoTAnalyticsClient = boto3.client('iotanalytics')`. affects: All versions
Upgrade
Version history
1.42.3latest on PyPI · released Dec 4, 2025
Audit
Dependencies
boto3requiredProvides the AWS SDK for Python, which these type stubs annotate.
mypyrequiredThe primary static type checker that utilizes these annotations.
typing-extensionsoptionalRequired for full compatibility with type features on older Python versions (e.g., Python 3.8).