types-aiobotocore-events
raw JSON → 3.5.0 verified Mon Apr 27 auth: no python
Type annotations for aiobotocore EventBridge 3.5.0 service, generated with mypy-boto3-builder 8.12.0. Provides static typing for EventBridge interactions with aiobotocore. Current version: 3.5.0, released April 2025. Release cadence matches aiobotocore updates.
pip install types-aiobotocore-events Common errors
error ModuleNotFoundError: No module named 'types_aiobotocore_events' ↓
cause Package not installed or wrong import path.
fix
pip install types-aiobotocore-events
error AttributeError: 'EventBridgeClient' object has no attribute 'put_events' ↓
cause Using wrong import or missing aiobotocore installation.
fix
Ensure aiobotocore is installed: pip install aiobotocore; check that client is created with session.create_client('events').
error TypeError: 'type' object is not subscriptable ↓
cause Using List[SomeTypeDef] without future annotations import in Python <3.9.
fix
Add from __future__ import annotations at top of file or upgrade to Python 3.9+.
Warnings
gotcha The package provides only type stubs; you must install aiobotocore and botocore separately. ↓
fix pip install aiobotocore types-aiobotocore-events
deprecated Python 3.8 is no longer supported since types-aiobotocore 3.x (mypy-boto3-builder 8.12.0+). ↓
fix Use Python >=3.9
breaking TypeDef names for method arguments were simplified in mypy-boto3-builder 8.9.0 (e.g., CreateDistributionRequestRequestTypeDef → CreateDistributionRequestTypeDef). ↓
fix Update type imports to use the shorter TypeDef names.
gotcha Version numbers for types-aiobotocore-events match the aiobotocore service version, not the builder version. Check the aiobotocore release notes for breaking API changes. ↓
fix Align your aiobotocore version with the types package version.
Imports
- EventBridgeClient wrong
from aiobotocore.events import EventBridgeClientcorrectfrom types_aiobotocore_events.client import EventBridgeClient - ListRulesPaginator wrong
from aiobotocore.paginate import ListRulesPaginatorcorrectfrom types_aiobotocore_events.paginator import ListRulesPaginator - PutEventsRequestRequestTypeDef wrong
from typing import TypedDict; class PutEventsRequest(...)correctfrom types_aiobotocore_events.literals import PutEventsRequestRequestTypeDef
Quickstart
import asyncio
from types_aiobotocore_events import EventBridgeClient
async def main():
session = ... # your aiobotocore session
async with session.create_client('events', region_name='us-east-1') as client:
# client is type-annotated as EventBridgeClient
response = await client.put_events(Entries=[{'Source': 'my.app', 'DetailType': 'test', 'Detail': '{}'}]) # type: ignore
print(response)
asyncio.run(main())