Skip to content

SQSEvent

The pydantic base model for typed message payloads.

SQSEvent

Bases: BaseModel

Base class for SQS event models.

Subclasses declare typed fields; the class name is the message type used for routing. Both snake_case field names and their camelCase aliases are accepted (Pydantic alias generation with populate_by_name), so a payload may use either convention without bespoke normalization.

get_message_type classmethod

get_message_type() -> str

Primary message type for this event class (snake_case of the class name).

get_message_type_variants classmethod

get_message_type_variants() -> Set[str]

Message-type variants for flexible matching: the class name plus its snake_case, camelCase and kebab-case forms.