We use cookies

We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking "Accept", you agree to our use of cookies.
Learn more.

SDK ReferencePython SDKFeature ClientsWorkflows

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_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.
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.

Functions

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.

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.