Examples
Index > PersonalizeEvents > Examples
Auto-generated documentation for PersonalizeEvents type annotations stubs module types-aiobotocore-personalize-events.
Client
Implicit type annotations
Can be used with types-aioboto3[personalize-events]
package installed.
Write your PersonalizeEvents
code as usual,
type checking and code completion should work out of the box.
Client usage example
from aioboto3.session import Session
session = Session()
async with session.client("personalize-events") as client: # (1)
result = await client.put_events() # (2)
- client: PersonalizeEventsClient
- result: EmptyResponseMetadataTypeDef
Explicit type annotations
With types-aioboto3-lite[personalize-events]
or a standalone types_aiobotocore_personalize_events
package, you have to explicitly specify
client: PersonalizeEventsClient
type annotation.
All other type annotations are optional, as types should be discovered automatically. However, these type annotations can be helpful in your functions and methods.
Client usage example
from aioboto3.session import Session
from types_aiobotocore_personalize_events.client import PersonalizeEventsClient
from types_aiobotocore_personalize_events.type_defs import EmptyResponseMetadataTypeDef
from types_aiobotocore_personalize_events.type_defs import PutEventsRequestRequestTypeDef
session = Session()
client: PersonalizeEventsClient
async with session.client("personalize-events") as client: # (1)
kwargs: PutEventsRequestRequestTypeDef = {...} # (2)
result: EmptyResponseMetadataTypeDef = await client.put_events(**kwargs) # (3)
- client: PersonalizeEventsClient
- kwargs: PutEventsRequestRequestTypeDef
- result: EmptyResponseMetadataTypeDef