types-boto3-events
raw JSON → 1.43.0 verified Fri May 01 auth: no python
Type annotations for boto3 EventBridge (Amazon EventBridge) service, generated with mypy-boto3-builder. This package provides static type stubs for boto3's events client, enabling type checking and autocomplete in IDEs. Version 1.43.0 targets the EventBridge API version 1.43.0. Released weekly.
pip install types-boto3-events Common errors
error ModuleNotFoundError: No module named 'mypy_boto3_events' ↓
cause The types package is not installed.
fix
pip install types-boto3-events
error Cannot find reference 'EventBridgeClient' in 'boto3.events' ↓
cause Trying to import the client from the wrong module.
fix
Use 'from mypy_boto3_events.client import EventBridgeClient' instead.
error AttributeError: module 'mypy_boto3_events' has no attribute 'client' ↓
cause Trying to use 'mypy_boto3_events.client' as a factory, but it only contains type stubs.
fix
Use boto3.client('events') and annotate the result with the type: client: EventBridgeClient = boto3.client('events')
Warnings
breaking In version 8.9.0, TypeDef names for packed method arguments were shortened (e.g., CreateDistributionRequestRequestTypeDef became CreateDistributionRequestTypeDef), which may break code relying on old names. ↓
fix Update any references to shortened TypeDef names accordingly.
breaking In version 8.12.0, support for Python 3.8 was dropped. This package now requires Python >=3.9. ↓
fix Upgrade Python to 3.9 or later, or pin an older version of types-boto3-events if Python 3.8 is required.
gotcha Ensure you have installed the matching version of types-boto3-events for your boto3 version. Mismatches can cause type errors or missing attributes. ↓
fix Use 'pip install types-boto3-events' and keep it updated alongside boto3.
deprecated Legacy mypy-boto3 product was moved to a separate package and is no longer generated along with boto3-stubs. If you rely on the old 'boto3-stubs[events]' extra, update to 'types-boto3-events'. ↓
fix Install types-boto3-events directly instead of using the old extra.
Imports
- EventBridgeClient wrong
from boto3.events import EventBridgeClientcorrectfrom mypy_boto3_events.client import EventBridgeClient - ListEventBusesPaginator
from mypy_boto3_events.paginator import ListEventBusesPaginator
Quickstart
import boto3
from mypy_boto3_events import EventBridgeClient
client: EventBridgeClient = boto3.client('events', region_name='us-east-1')
print(client.list_event_buses()['EventBuses'])