Package: hera
HeraHera is a Python framework for constructing and submitting Argo Workflows. The main goal of Hera is to make the Argo
ecosystem accessible by simplifying workflow construction and submission.See the Quick Start guideto start using Hera to
orchestrate your Argo Workflows!The Argo was constructed by the shipwright Argus,
and its crew were specially protected by the goddess Hera.PyPi statsRepo informationExplore the codeHera at a glanceSteps diamondfromhera.workflowsimportSteps,Workflow,script@script()defecho(message:str):print(message)withWorkflow(generate_name="single-script-",entrypoint="steps",)asw:withSteps(name="steps")ass:echo(name="A",arguments={"message":"I'm a step"})withs.parallel():echo(name="B",arguments={"message":"We're steps"})echo(name="C",arguments={"message":"in parallel!"})echo(name="D",arguments={"message":"I'm another step!"})w.create()DAG diamondfromhera.workflowsimportDAG,Workflow,script@script()defecho(message:str):print(message)withWorkflow(generate_name="dag-diamond-",entrypoint="diamond",)asw:withDAG(name="diamond"):A=echo(name="A",arguments={"message":"A"})B=echo(name="B",arguments={"message":"B"})C=echo(name="C",arguments={"message":"C"})D=echo(name="D",arguments={"message":"D"})A>>[B,C]>>Dw.create()See theexamplesfor a collection of Argo workflow construction and submission via
Hera!RequirementsHera requires an Argo server to be deployed to a Kubernetes cluster. Currently, Hera assumes that the Argo server sits
behind an authentication layer that can authenticate workflow submission requests by using the Bearer token on the
request. To learn how to deploy Argo to your own Kubernetes cluster you can follow
theArgo Workflowsguide!Another option for workflow submission without the authentication layer is using port forwarding to your Argo server
deployment and submitting workflows tolocalhost:2746(2746 is the default, but you are free to change it). Please
refer to the documentation ofArgo Workflowsto see the
command for port forward!NoteSince the deprecation of tokens being automatically created for ServiceAccounts and Argo using Bearer tokens
in place, it is necessary to use--auth=serverand/or--auth=clientwhen setting up Argo Workflows on Kubernetes
v1.24+ in order for hera to communicate to the Argo Server.Authenticating in HeraThere are a few ways to authenticate in Hera - read more in theauthentication walk through- for now, with theargocli tool installed, this example will get you up and running:fromhera.workflowsimportWorkflow,Containerfromhera.sharedimportglobal_configfromhera.authimportArgoCLITokenGeneratorglobal_config.host="http://localhost:2746"global_config.token=ArgoCLITokenGeneratorwithWorkflow(generate_name="local-test-",entrypoint="c")asw:Container(name="c",image="docker/whalesay",command=["cowsay","hello"])w.create()InstallationNoteHera went through a name change - fromhera-workflowstohera. This is reflected in the published Python
package. If you'd like to install versions prior to5.0.0, you have to usehera-workflows. Hera currently
publishes releases to bothheraandhera-workflowsfor backwards compatibility purposes.SourceCommandPyPipip install heraPyPipip install hera-workflowsGitHub repopython -m pip install git+https://github.com/argoproj-labs/hera --ignore-installed/pip install .Optional dependenciesyamlInstall viahera[yaml]PyYAMLis required for theyamloutput format, which is accessible viahera.workflows.Workflow.to_yaml(*args, **kwargs). This enables GitOps practices and easier debugging.cliInstall viahera[cli]. The[cli]option installs the extra dependencyCapparequired for the CLIThe CLI aims to enable GitOps practices,
easier debugging, and a more seamless experience with Argo Workflows.The CLI is an experimental feature and subject to change!At the moment it only supports generating YAML files
from workflows viahera generate yaml. Seehera generate yaml --helpfor more information.PresentationsArgo Workflows and Events Community Meeting 20 Oct 2021 - Hera introductory presentationArgo Workflows and Events Community Meeting 15 June 2022 - Hera project updateKubeCon/ArgoCon EU 2023 - Scaling gene therapy with Argo Workflows and HeraDoKC Town Hall #2 - Unsticking ourselves from Glue - Migrating PayIt's Data Pipelines to Argo Workflows and HeraKubeCon / ArgoCon NA 2023 - How to Train an LLM with Argo Workflows and HeraFeatured codeCNCF TAG App-Delivery @ KubeCon NA 2023 - Automating the Deployment of Data Workloads to Kubernetes with ArgoCD, Argo Workflows, and HeraBlogsData Validation with Great Expectations and Argo WorkflowsHera introduction and motivationDyno is scaling gene therapy research with cloud-native tools like Argo Workflows and HeraContributingSee thecontributing guide!