Python SDKFeature Clients

Workflows Client

Bases: BaseRestClient

The workflows client is a client for managing workflows programmatically within Hatchet.

Note that workflows are the declaration, not the individual runs. If you're looking for runs, use the RunsClient instead.

Methods:

NameDescription
aio_deletePermanently delete a workflow.
aio_getGet a workflow by its ID.
aio_get_versionGet a workflow version by the workflow ID and an optional version.
aio_listList all workflows in the tenant determined by the client config that match optional filters.
aio_pausePause a workflow.
aio_unpauseUnpause a workflow.
deletePermanently delete a workflow.
getGet a workflow by its ID.
get_versionGet a workflow version by the workflow ID and an optional version.
listList all workflows in the tenant determined by the client config that match optional filters.
pausePause a workflow.
unpauseUnpause a workflow.

Functions

aio_delete

Permanently delete a workflow.

DANGEROUS: This will delete a workflow and all of its data

Parameters:

NameTypeDescriptionDefault
workflow_idstrThe ID of the workflow to delete.required

Returns:

TypeDescription
NoneNone

aio_get

Get a workflow by its ID.

Parameters:

NameTypeDescriptionDefault
workflow_idstrThe ID of the workflow to retrieve.required

Returns:

TypeDescription
WorkflowThe workflow.

aio_get_version

Get a workflow version by the workflow ID and an optional version.

Parameters:

NameTypeDescriptionDefault
workflow_idstrThe ID of the workflow to retrieve the version for.required
versionstr | NoneThe version of the workflow to retrieve. If None, the latest version is returned.None

Returns:

TypeDescription
WorkflowVersionThe workflow version.

aio_list

List all workflows in the tenant determined by the client config that match optional filters.

Parameters:

NameTypeDescriptionDefault
workflow_namestr | NoneThe name of the workflow to filter by.None
limitint | NoneThe maximum number of items to return.None
offsetint | NoneThe offset to start the list from.None

Returns:

TypeDescription
WorkflowListA list of workflows.

aio_pause

Pause a workflow.

Parameters:

NameTypeDescriptionDefault
workflow_idstrThe ID of the workflow to pause.required
queue_ttltimedeltaThe TTL for queued runs while the workflow is paused before they get dropped.required
paused_workflow_cron_run_queue_behaviorLiteral['DROP', 'QUEUE']The behavior of cron runs triggered while the workflow is paused.'QUEUE'
paused_workflow_scheduled_run_queue_behaviorLiteral['DROP', 'QUEUE']The behavior of scheduled runs triggered while the workflow is paused.'QUEUE'

Returns:

TypeDescription
WorkflowThe updated workflow.

aio_unpause

Unpause a workflow.

Parameters:

NameTypeDescriptionDefault
workflow_idstrThe ID of the workflow to unpause.required

Returns:

TypeDescription
WorkflowThe updated workflow.

delete

Permanently delete a workflow.

DANGEROUS: This will delete a workflow and all of its data

Parameters:

NameTypeDescriptionDefault
workflow_idstrThe ID of the workflow to delete.required

Returns:

TypeDescription
NoneNone

get

Get a workflow by its ID.

Parameters:

NameTypeDescriptionDefault
workflow_idstrThe ID of the workflow to retrieve.required

Returns:

TypeDescription
WorkflowThe workflow.

get_version

Get a workflow version by the workflow ID and an optional version.

Parameters:

NameTypeDescriptionDefault
workflow_idstrThe ID of the workflow to retrieve the version for.required
versionstr | NoneThe version of the workflow to retrieve. If None, the latest version is returned.None

Returns:

TypeDescription
WorkflowVersionThe workflow version.

list

List all workflows in the tenant determined by the client config that match optional filters.

Parameters:

NameTypeDescriptionDefault
workflow_namestr | NoneThe name of the workflow to filter by.None
limitint | NoneThe maximum number of items to return.None
offsetint | NoneThe offset to start the list from.None

Returns:

TypeDescription
WorkflowListA list of workflows.

pause

Pause a workflow.

Parameters:

NameTypeDescriptionDefault
workflow_idstrThe ID of the workflow to pause.required
queue_ttltimedeltaThe TTL for queued runs while the workflow is paused before they get dropped.required
paused_workflow_cron_run_queue_behaviorLiteral['DROP', 'QUEUE']The behavior of cron runs triggered while the workflow is paused.'QUEUE'
paused_workflow_scheduled_run_queue_behaviorLiteral['DROP', 'QUEUE']The behavior of scheduled runs triggered while the workflow is paused.'QUEUE'

Returns:

TypeDescription
WorkflowThe updated workflow.

unpause

Unpause a workflow.

Parameters:

NameTypeDescriptionDefault
workflow_idstrThe ID of the workflow to unpause.required

Returns:

TypeDescription
WorkflowThe updated workflow.

Last updated on September 1, 2026

On this page