Registry / type-stubs / mypy-boto3-iotevents-data

mypy-boto3-iotevents-data

JSON →
library1.43.0pypypi✓ verified 22d ago

mypy-boto3-iotevents-data provides type annotations for the `boto3` IoTEventsData service, ensuring type safety and improved autocompletion for Python developers. It is currently at version 1.42.3 and is part of the `mypy-boto3` family, with new releases frequently generated by `mypy-boto3-builder` to stay in sync with `boto3` updates.

pip install mypy-boto3-iotevents-data boto3 mypy
INSTALL
IMPORT
SIG · MYPY-BOTO3-IOTEVEN
M
mypy-boto3-iotevents-data
type-stubspythonv1.43.0
Install
6.1s avg
Import
572ms
Disk
114MB
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.586s · 116.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 6.1s · import 0.558s · 114MB
114MB installed
● package 114MB
Code
Verified usage

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

IoTEventsDataClient
from mypy_boto3_iotevents_data.client import IoTEventsDataClient
Import the typed client for IoTEventsData service.
IoTEventsDataServiceResource
from mypy_boto3_iotevents_data.service_resource import IoTEventsDataServiceResource
Import the typed service resource if using resource interfaces.
PutMessageRequestRequestTypeDef
from mypy_boto3_iotevents_data.type_defs import PutMessageRequestRequestTypeDef
from mypy_boto3_iotevents_data.type_defs import PutMessageRequestTypeDef
Breaking change in builder v8.9.0 for TypeDef naming: packed method arguments use a 'Request' suffix. Always consult latest docs or use IDE autocompletion for TypeDef names.

This quickstart demonstrates how to use `mypy-boto3-iotevents-data` to get a typed client and send data to AWS IoT Events. It explicitly annotates the `boto3` client to leverage the provided type hints. Remember that `mypy-boto3-iotevents-data` provides type annotations, so `boto3` itself must be installed for runtime functionality.

import boto3 from mypy_boto3_iotevents_data.client import IoTEventsDataClient from mypy_boto3_iotevents_data.type_defs import PutMessageRequestRequestTypeDef import os def send_iot_event_data(event_data: PutMessageRequestRequestTypeDef) -> dict: session = boto3.Session(region_name=os.environ.get('AWS_REGION', 'us-east-1')) client: IoTEventsDataClient = session.client('iotevents-data') response = client.put_message(messages=[event_data]) print(f"Sent IoT Event Data: {response}") return response if __name__ == "__main__": # Example usage - replace with actual event data # In a real scenario, you'd populate this with data for your detector model. sample_event = { "messageId": "my-unique-message-id", "inputName": "my-input", "payload": b'{"temperature": 25.5}' # Payload must be bytes } try: # Ensure AWS_REGION is set in environment, or provide it directly os.environ['AWS_REGION'] = os.environ.get('AWS_REGION', 'us-east-1') send_iot_event_data(sample_event) except Exception as e: print(f"Error sending IoT Event Data: {e}")
Debug
Known issues
breakingPython 3.8 support was removed with `mypy-boto3-builder` version 8.12.0 for all generated packages, including `mypy-boto3-iotevents-data`. Ensure your project uses Python 3.9 or newer.
fix
Upgrade your Python environment to version 3.9 or higher.
affects: mypy-boto3-builder >=8.12.0
breakingThe underlying `mypy-boto3-builder` (v8.9.0) introduced breaking changes in `TypeDef` naming conventions. Packed method arguments now use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`) and conflicting `TypeDef` postfixes were moved (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`).
fix
Update `TypeDef` imports and usage in your code to match the new naming conventions. Use IDE autocompletion for correct names.
affects: mypy-boto3-builder >=8.9.0
breakingThe `mypy-boto3-builder` (v8.12.0) migrated to PEP 561 compliant packages. While this is generally beneficial, it might cause subtle changes in how type checkers discover or interact with the stubs, especially in complex project setups.
fix
Ensure your `mypy` configuration is up-to-date and type checking environments are properly set up. Re-evaluate `mypy` errors if they appear unexpectedly after upgrading.
affects: mypy-boto3-builder >=8.12.0
gotchaThis library provides *type annotations* only. You must also install `boto3` (or `aiobotocore`/`aioboto3` for async variants) for the actual AWS SDK runtime functionality. Without `boto3` installed, your code will fail at runtime.
fix
Always install `boto3` alongside `mypy-boto3-iotevents-data`: `pip install boto3 mypy-boto3-iotevents-data`.
affects: All
gotchaFor standalone `mypy-boto3-*` packages like this one, explicit type annotations for clients (e.g., `client: IoTEventsDataClient = session.client(...)`) are generally required for full IDE autocompletion and `mypy` functionality. Implicit typing might not work as expected.
fix
Explicitly add type hints to your `boto3` clients, resources, paginators, and response types in your code.
affects: All
gotchaPyCharm users might experience slow performance with `Literal` overloads due to a known IDE issue (PY-40997). For better performance, consider using `boto3-stubs-lite` or external type checkers like `mypy` or `pyright`.
fix
Disable PyCharm's built-in type checker and use `mypy` or `pyright`, or install `boto3-stubs-lite` instead of the full stubs.
affects: All
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime dependency for AWS SDK functionality.
mypyrequiredType checker to utilize the provided annotations.
typing-extensionsoptionalImplicitly required for older Python versions (prior to 3.9) by the builder for some type features.
Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
mypy-boto3-iotevents-data — pip install mypy-boto3-iotevents-data · libregistry