Python SDKFeature Clients

Events ClientPython SDK

Bases: BaseRestClient

The events client is a client for pushing events to Hatchet and reading the events that were pushed.

Methods:

NameDescription
aio_bulk_pushPush many events to Hatchet in a single request.
aio_getRetrieve an event by its ID.
aio_listList events that were pushed to the tenant.
aio_pushPush an event to Hatchet, triggering any workflows that listen for its key.
bulk_pushPush many events to Hatchet in a single request.
getRetrieve an event by its ID.
listList events that were pushed to the tenant.
pushPush an event to Hatchet, triggering any workflows that listen for its key.

Functions

aio_bulk_push

Push many events to Hatchet in a single request.

Parameters:

NameTypeDescriptionDefault
eventslist[BulkPushEventWithMetadata]The events to push.required

Returns:

TypeDescription
list[Event]The events that were pushed.

aio_get

Retrieve an event by its ID.

Parameters:

NameTypeDescriptionDefault
event_idstrThe ID of the event to retrieve.required

Returns:

TypeDescription
EventThe requested event.

aio_list

List events that were pushed to the tenant.

Parameters:

NameTypeDescriptionDefault
offsetint | NoneThe number of events to skip.None
limitint | NoneThe maximum number of events to return.None
keyslist[str] | NoneOnly return events with one of these keys.None
sincedatetime | NoneOnly return events seen at or after this time.None
untildatetime | NoneOnly return events seen at or before this time.None
workflow_idslist[str] | NoneOnly return events that triggered one of these workflows.None
workflow_run_statuseslist[Literal['QUEUED', 'RUNNING', 'COMPLETED', 'CANCELLED', 'FAILED']] | NoneOnly return events that triggered a run in one of these statuses.None
event_idslist[str] | NoneOnly return events with one of these IDs.None
additional_metadataJSONSerializableMapping | NoneOnly return events whose additional metadata contains these key-value pairs.None
scopeslist[str] | NoneOnly return events with one of these scopes.None

Returns:

TypeDescription
list[Event]The matching events.

aio_push

Push an event to Hatchet, triggering any workflows that listen for its key.

Parameters:

NameTypeDescriptionDefault
event_keystrThe key of the event. Workflows declared with this key in on_events are triggered.required
payloadJSONSerializableMappingThe payload of the event, which becomes the input of the triggered runs.required
additional_metadataJSONSerializableMapping | NoneAdditional metadata to attach to the event and to the runs it triggers.None
priorityLiteral['LOW', 'MEDIUM', 'HIGH'] | NoneThe priority to give the runs triggered by the event.None
scopestr | NoneThe scope of the event, used to match it against event filters.None

Returns:

TypeDescription
EventThe event that was pushed.

bulk_push

Push many events to Hatchet in a single request.

Parameters:

NameTypeDescriptionDefault
eventslist[BulkPushEventWithMetadata]The events to push.required

Returns:

TypeDescription
list[Event]The events that were pushed.

get

Retrieve an event by its ID.

Parameters:

NameTypeDescriptionDefault
event_idstrThe ID of the event to retrieve.required

Returns:

TypeDescription
EventThe requested event.

list

List events that were pushed to the tenant.

Parameters:

NameTypeDescriptionDefault
offsetint | NoneThe number of events to skip.None
limitint | NoneThe maximum number of events to return.None
keyslist[str] | NoneOnly return events with one of these keys.None
sincedatetime | NoneOnly return events seen at or after this time.None
untildatetime | NoneOnly return events seen at or before this time.None
workflow_idslist[str] | NoneOnly return events that triggered one of these workflows.None
workflow_run_statuseslist[Literal['QUEUED', 'RUNNING', 'COMPLETED', 'CANCELLED', 'FAILED']] | NoneOnly return events that triggered a run in one of these statuses.None
event_idslist[str] | NoneOnly return events with one of these IDs.None
additional_metadataJSONSerializableMapping | NoneOnly return events whose additional metadata contains these key-value pairs.None
scopeslist[str] | NoneOnly return events with one of these scopes.None

Returns:

TypeDescription
list[Event]The matching events.

push

Push an event to Hatchet, triggering any workflows that listen for its key.

Parameters:

NameTypeDescriptionDefault
event_keystrThe key of the event. Workflows declared with this key in on_events are triggered.required
payloadJSONSerializableMappingThe payload of the event, which becomes the input of the triggered runs.required
additional_metadataJSONSerializableMapping | NoneAdditional metadata to attach to the event and to the runs it triggers.None
priorityLiteral['LOW', 'MEDIUM', 'HIGH'] | NoneThe priority to give the runs triggered by the event.None
scopestr | NoneThe scope of the event, used to match it against event filters.None

Returns:

TypeDescription
EventThe event that was pushed.

Last updated on November 13, 2026

On this page