Skip to content

Create a workflow

Choose the runtime guide for instructions on creating, configuring, and executing that kind of workflow.

Choose a workflow kind

  • Hera - Build workflows with Hera pipelines - hera

Create a workflow

Use new_workflow() to create and save a workflow. See the Hera runtime documentation for runtime-specific requirements.

new_workflow

Create a new workflow entity in the backend.

Parameters:

Name Type Description Default
project str

Project name.

required
name str

Entity name.

required
kind str

Entity kind.

required
uuid str

Entity identifier.

None
version str

Entity version.

None
description str

Human-readable entity description.

None
labels list[str]

Entity labels.

None
embedded bool

Whether to embed the entity specification in the project specification.

False
**kwargs dict

Additional entity specification parameters.

{}

Returns:

Type Description
Workflow

Created workflow entity.

Examples:

Create a Hera workflow:

import digitalhub as dh

workflow = dh.new_workflow(
    project="my-project",
    name="my-workflow",
    kind="hera",
    code_src="pipeline.py",
    handler="pipeline-handler",
)