Skip to content

Typed dictionaries

Index > PersonalizeEvents > Typed dictionaries

Auto-generated documentation for PersonalizeEvents type annotations stubs module mypy-boto3-personalize-events.

ResponseMetadataTypeDef

Usage Example
from mypy_boto3_personalize_events.type_defs import ResponseMetadataTypeDef

def get_value() -> ResponseMetadataTypeDef:
    return {
        "RequestId": ...,
        "HostId": ...,
        "HTTPStatusCode": ...,
        "HTTPHeaders": ...,
        "RetryAttempts": ...,
    }
Definition
class ResponseMetadataTypeDef(TypedDict):
    RequestId: str,
    HostId: str,
    HTTPStatusCode: int,
    HTTPHeaders: Dict[str, str],
    RetryAttempts: int,

EventTypeDef

Usage Example
from mypy_boto3_personalize_events.type_defs import EventTypeDef

def get_value() -> EventTypeDef:
    return {
        "eventType": ...,
        "sentAt": ...,
    }
Definition
class EventTypeDef(TypedDict):
    eventType: str,
    sentAt: Union[datetime, str],
    eventId: NotRequired[str],
    eventValue: NotRequired[float],
    itemId: NotRequired[str],
    properties: NotRequired[str],
    recommendationId: NotRequired[str],
    impression: NotRequired[Sequence[str]],

ItemTypeDef

Usage Example
from mypy_boto3_personalize_events.type_defs import ItemTypeDef

def get_value() -> ItemTypeDef:
    return {
        "itemId": ...,
    }
Definition
class ItemTypeDef(TypedDict):
    itemId: str,
    properties: NotRequired[str],

UserTypeDef

Usage Example
from mypy_boto3_personalize_events.type_defs import UserTypeDef

def get_value() -> UserTypeDef:
    return {
        "userId": ...,
    }
Definition
class UserTypeDef(TypedDict):
    userId: str,
    properties: NotRequired[str],

EmptyResponseMetadataTypeDef

Usage Example
from mypy_boto3_personalize_events.type_defs import EmptyResponseMetadataTypeDef

def get_value() -> EmptyResponseMetadataTypeDef:
    return {
        "ResponseMetadata": ...,
    }
Definition
class EmptyResponseMetadataTypeDef(TypedDict):
    ResponseMetadata: ResponseMetadataTypeDef,  # (1)
  1. See ResponseMetadataTypeDef

PutEventsRequestRequestTypeDef

Usage Example
from mypy_boto3_personalize_events.type_defs import PutEventsRequestRequestTypeDef

def get_value() -> PutEventsRequestRequestTypeDef:
    return {
        "trackingId": ...,
        "sessionId": ...,
        "eventList": ...,
    }
Definition
class PutEventsRequestRequestTypeDef(TypedDict):
    trackingId: str,
    sessionId: str,
    eventList: Sequence[EventTypeDef],  # (1)
    userId: NotRequired[str],
  1. See EventTypeDef

PutItemsRequestRequestTypeDef

Usage Example
from mypy_boto3_personalize_events.type_defs import PutItemsRequestRequestTypeDef

def get_value() -> PutItemsRequestRequestTypeDef:
    return {
        "datasetArn": ...,
        "items": ...,
    }
Definition
class PutItemsRequestRequestTypeDef(TypedDict):
    datasetArn: str,
    items: Sequence[ItemTypeDef],  # (1)
  1. See ItemTypeDef

PutUsersRequestRequestTypeDef

Usage Example
from mypy_boto3_personalize_events.type_defs import PutUsersRequestRequestTypeDef

def get_value() -> PutUsersRequestRequestTypeDef:
    return {
        "datasetArn": ...,
        "users": ...,
    }
Definition
class PutUsersRequestRequestTypeDef(TypedDict):
    datasetArn: str,
    users: Sequence[UserTypeDef],  # (1)
  1. See UserTypeDef