hera

Hera makes Python code easy to orchestrate on Argo Workflows through native Python integrations. It lets you construct and submit your Workflows entirely in Python. ⭐️ Remember to star!

https://github.com/argoproj-labs/hera

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 67 committers (1.5%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.3%) to scientific vocabulary

Keywords

argo argo-events argo-workflows cloud-native hera kubernetes library machine-learning pypi python sdk workflow-automation workflow-management workflows

Keywords from Contributors

autograd prompt-engineering observability mlflow pydantic json-schema mlops distribution tensor asyncio
Last synced: 6 months ago · JSON representation

Repository

Hera makes Python code easy to orchestrate on Argo Workflows through native Python integrations. It lets you construct and submit your Workflows entirely in Python. ⭐️ Remember to star!

Basic Info
  • Host: GitHub
  • Owner: argoproj-labs
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Homepage: https://hera.rtfd.io
  • Size: 5.15 MB
Statistics
  • Stars: 771
  • Watchers: 11
  • Forks: 115
  • Open Issues: 40
  • Releases: 72
Topics
argo argo-events argo-workflows cloud-native hera kubernetes library machine-learning pypi python sdk workflow-automation workflow-management workflows
Created over 4 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Codeowners Security Governance

README.md

Hera

| Hera mascot | Hera is the go-to Python SDK to make Argo Workflows simple and intuitive. Easily turn Python functions into containerised templates that run on Kubernetes, with full access to its capabilities. | |---|---|

See the Quick Start guide to start using Hera to orchestrate your Argo Workflows!

text The Argo was constructed by the shipwright Argus, and its crew were specially protected by the goddess Hera.

PyPI stats

PyPI Versions

Downloads Downloads/month Downloads/week

Repo information

License: Apache-2.0 CICD Docs codecov

Hera at a glance

```python from hera.workflows import DAG, Workflow, script

Turn a function into a reusable "Script template"

using the script decorator

@script() def echo(message: str): print(message)

Orchestration logic lives outside of business logic

with Workflow( generate_name="dag-diamond-", entrypoint="diamond", ) as w: with DAG(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] >> D # Define execution order

Create the workflow directly on your Argo Workflows cluster!

w.create() ```

Check out the Walkthrough to learn how to construct and submit Argo Workflows with Hera!

Requirements

Hera requires an Argo Workflows server to be deployed to a Kubernetes cluster. To learn how to deploy Argo to your own Kubernetes cluster you can follow the Argo Workflows guide!

Authenticating in Hera

Hera assumes that the Argo server sits behind an authentication layer, so workflow submission requests are authenticated using a Bearer token on the request. Another option for workflow submission without the authentication layer is using port forwarding to your Argo server deployment and submitting workflows to localhost:2746.

There are a few ways to authenticate in Hera - read more in the authentication walkthrough - for now, with the argo cli tool installed, and the server port-forwarded to localhost:2746, this example will get you up and running:

```py from hera.workflows import Workflow, Container from hera.shared import global_config from hera.auth import ArgoCLITokenGenerator

globalconfig.host = "http://localhost:2746" globalconfig.token = ArgoCLITokenGenerator

with Workflow(generate_name="local-test-", entrypoint="c") as w: Container(name="c", image="docker/whalesay", command=["cowsay", "hello"])

w.create() ```

Installation

| Source | Command | |------------------------------------------------------|--------------------------------------------------------------------------------------| | PyPI | pip install hera | | GitHub repo | python -m pip install git+https://github.com/argoproj-labs/hera --ignore-installed |

Optional dependencies

yaml

  • Install via hera[yaml]
  • PyYAML is required for the yaml output format, which is accessible via hera.workflows.Workflow.to_yaml(*args, **kwargs). This enables GitOps practices and easier debugging.

cli

  • Install via hera[cli]. The [cli] option installs the extra dependency Cappa required for the CLI
  • The 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 via hera generate yaml. See hera generate yaml --help for more information.

experimental

  • Install via hera[experimental]. The [experimental] option adds dependencies required for experimental features that have not yet graduated into stable features.

async-client

  • Install via hera[async-client]. The [async-client] option installs httpx to allow the use of the async_* Workflow functions through the AsyncWorkflowsService.

Presentations

More presentations - [CNCF TAG App-Delivery @ KubeCon NA 2023 - Automating the Deployment of Data Workloads to Kubernetes with ArgoCD, Argo Workflows, and Hera](https://www.youtube.com/watch?v=NZCmYRVziGY&t=12481s&ab_channel=CNCFTAGAppDelivery) - [KubeCon/ArgoCon NA 2023 - How to Train an LLM with Argo Workflows and Hera](https://www.youtube.com/watch?v=nRYf3GkKpss&ab_channel=CNCF%5BCloudNativeComputingFoundation%5D) - [Featured code](https://github.com/flaviuvadan/kubecon_na_23_llama2_finetune) - [KubeCon/ArgoCon EU 2023 - Scaling gene therapy with Argo Workflows and Hera](https://www.youtube.com/watch?v=h2TEw8kd1Ds) - [DoKC Town Hall #2 - Unsticking ourselves from Glue - Migrating PayIt's Data Pipelines to Argo Workflows and Hera](https://youtu.be/sSLFVIIEKcE?t=2088) - [Argo Workflows and Events Community Meeting 15 June 2022 - Hera project update](https://youtu.be/sdkBDPOdQ-g?t=231) - [Argo Workflows and Events Community Meeting 20 Oct 2021 - Hera introductory presentation](https://youtu.be/QETfzfVV-GY?t=181)

Blogs

More blogs - [Hera introduction and motivation](https://www.dynotx.com/hera-the-missing-argo-workflows-python-sdk/) - [Dyno is scaling gene therapy research with cloud-native tools like Argo Workflows and Hera](https://www.dynotx.com/argo-workflows-hera/)

Contributing

Use one of the following to open the repo in a cloud dev box:

Open in GitHub Codespaces Open in Gitpod

Read more in the contributing guide!

Hera Emeritus Maintainers

These emeritus maintainers dedicated a part of their career to Hera and reviewed code, triaged bugs and pushed the project forward over a substantial period of time. Their contribution is greatly appreciated:

License

Hera is licensed under Apache 2.0. See License for details.

Owner

  • Name: argoproj-labs
  • Login: argoproj-labs
  • Kind: organization

GitHub Events

Total
  • Create event: 135
  • Commit comment event: 4
  • Release event: 4
  • Issues event: 95
  • Watch event: 163
  • Delete event: 128
  • Issue comment event: 258
  • Push event: 416
  • Pull request review comment event: 243
  • Pull request event: 262
  • Pull request review event: 290
  • Fork event: 12
Last Year
  • Create event: 135
  • Commit comment event: 4
  • Release event: 4
  • Issues event: 95
  • Watch event: 163
  • Delete event: 128
  • Issue comment event: 258
  • Push event: 416
  • Pull request review comment event: 243
  • Pull request event: 262
  • Pull request review event: 290
  • Fork event: 12

Committers

Last synced: 11 months ago

All Time
  • Total Commits: 720
  • Total Committers: 67
  • Avg Commits per committer: 10.746
  • Development Distribution Score (DDS): 0.711
Past Year
  • Commits: 199
  • Committers: 16
  • Avg Commits per committer: 12.438
  • Development Distribution Score (DDS): 0.603
Top Committers
Name Email Commits
Flaviu Vadan f****n@g****m 208
Elliot Gunton e****n@b****t 166
dependabot[bot] 4****] 148
Sambhav Kothari s****4@b****t 47
Alice a****n@g****m 15
Jacob Hayes j****s@g****m 13
Asgeir Berland a****d@g****m 11
Baz Chalk b****1@g****m 8
Mikolaj 5****o 8
Ukjae Jeong J****e@g****m 8
DanCardin D****n 7
Flynn c****n 4
eskild 4****d 3
Timothé Perez a****h@g****m 3
JP j****s@g****m 3
Helge Willum Thingvad 1****s 3
Harel Wahnich 6****a 3
Bob Haddleton b****6 3
NI1993 6****3 2
Rodrigo Baron b****0@g****m 2
Kurt Degiorgio D****o 2
Xiang Zhang x****6@g****m 2
mobin nik khesal 5****2 2
tmi v****a@g****m 2
Kengo k****o@h****m 2
Jaseem Abid me@j****n 2
GuyPozner g****r@m****l 2
Ryo Kitagawa k****0@g****m 2
Dan Lancour d****r@d****m 1
Ben B****m 1
and 37 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 259
  • Total pull requests: 905
  • Average time to close issues: 2 months
  • Average time to close pull requests: 4 days
  • Total issue authors: 80
  • Total pull request authors: 38
  • Average comments per issue: 1.26
  • Average comments per pull request: 0.98
  • Merged pull requests: 731
  • Bot issues: 1
  • Bot pull requests: 343
Past Year
  • Issues: 67
  • Pull requests: 334
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 4 days
  • Issue authors: 19
  • Pull request authors: 13
  • Average comments per issue: 0.63
  • Average comments per pull request: 0.99
  • Merged pull requests: 237
  • Bot issues: 1
  • Bot pull requests: 140
Top Authors
Issue Authors
  • elliotgunton (92)
  • flaviuvadan (23)
  • alicederyn (13)
  • abschm (7)
  • dejamiko (7)
  • jeongukjae (7)
  • samj1912 (6)
  • vikramsg (6)
  • mshatkhin23 (5)
  • sam2x (5)
  • cjxnn (3)
  • jplrts (3)
  • gaborbernat (3)
  • sebpretzer (3)
  • ljyanesm (3)
Pull Request Authors
  • dependabot[bot] (343)
  • elliotgunton (318)
  • flaviuvadan (80)
  • alicederyn (29)
  • samj1912 (25)
  • jeongukjae (17)
  • DanCardin (15)
  • dejamiko (11)
  • jaseemabid (8)
  • crflynn (7)
  • KengoA (4)
  • JacobHayes (4)
  • sambhav (4)
  • shyoon-devops (3)
  • iameskild (3)
Top Labels
Issue Labels
type:bug (76) type:enhancement (72) semver:patch (20) semver:minor (19) type:documentation (19) note:ideal-for-contribution (14) note:good-first-issue (10) type:task (6) type:question (6) type:dependency-upgrade (5) IO improvement work (5) type:informational (4) note:needs-info (2) type:poll (1) github_actions (1) python (1)
Pull Request Labels
semver:patch (626) type:dependency-upgrade (354) python (327) type:documentation (147) type:bug (118) semver:minor (118) type:enhancement (110) type:skip-changelog (105) type:task (21) type:informational (12) github_actions (11) IO improvement work (6) semver:major (2) final comment period (2)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 412,979 last-month
  • Total dependent packages: 5
    (may contain duplicates)
  • Total dependent repositories: 9
    (may contain duplicates)
  • Total versions: 190
  • Total maintainers: 3
pypi.org: hera

Hera makes Python code easy to orchestrate on Argo Workflows through native Python integrations. It lets you construct and submit your Workflows entirely in Python.

  • Versions: 62
  • Dependent Packages: 4
  • Dependent Repositories: 6
  • Downloads: 347,705 Last month
Rankings
Downloads: 1.1%
Dependent packages count: 1.9%
Stargazers count: 3.3%
Average: 3.4%
Forks count: 4.7%
Dependent repos count: 6.0%
Last synced: 6 months ago
pypi.org: hera-workflows

Hera makes Python code easy to orchestrate on Argo Workflows through native Python integrations. It lets you construct and submit your Workflows entirely in Python.

  • Versions: 128
  • Dependent Packages: 1
  • Dependent Repositories: 3
  • Downloads: 65,274 Last month
Rankings
Downloads: 2.0%
Stargazers count: 3.3%
Forks count: 4.7%
Average: 4.7%
Dependent packages count: 4.8%
Dependent repos count: 8.9%
Maintainers (2)
Last synced: 6 months ago

Dependencies

.github/workflows/cicd.yaml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • codecov/codecov-action v3 composite
.github/workflows/minimal-labels.yml actions
  • mheap/github-action-required-labels v5 composite
.github/workflows/pre-release.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
.github/workflows/publish.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
.github/workflows/release-updater.yml actions
  • release-drafter/release-drafter v5 composite
.github/workflows/sync-labels.yml actions
  • actions/checkout v4 composite
  • micnncim/action-label-syncer v1 composite
docs/versions.json meteor
docs/requirements.txt pypi
  • mkdocs *
  • mkdocs-awesome-pages-plugin *
  • mkdocs-click *
  • mkdocs-include-markdown-plugin *
  • mkdocs-material *
  • mkdocstrings *
  • typing_extensions *
poetry.lock pypi
  • anyio 3.6.2
  • argcomplete 2.0.0
  • attrs 22.2.0
  • black 23.10.1
  • build 1.0.3
  • certifi 2023.7.22
  • chardet 4.0.0
  • charset-normalizer 3.0.1
  • click 8.1.3
  • colorama 0.4.6
  • coverage 7.1.0
  • datamodel-code-generator 0.17.1
  • dnspython 2.3.0
  • email-validator 1.3.1
  • exceptiongroup 1.1.0
  • genson 1.2.2
  • h11 0.14.0
  • httpcore 0.16.3
  • httpx 0.23.3
  • idna 3.4
  • importlib-metadata 6.8.0
  • importlib-resources 5.12.0
  • inflect 5.6.2
  • iniconfig 2.0.0
  • isort 5.11.5
  • jinja2 3.1.2
  • jsonpath-ng 1.6.0
  • jsonschema 4.17.3
  • jsonschema-spec 0.1.3
  • lazy-object-proxy 1.9.0
  • markdown-it-py 2.2.0
  • markupsafe 2.1.2
  • mdurl 0.1.2
  • mypy 1.0.1
  • mypy-extensions 1.0.0
  • openapi-schema-validator 0.3.4
  • openapi-spec-validator 0.5.1
  • packaging 23.0
  • pathable 0.4.3
  • pathspec 0.11.0
  • pkgutil-resolve-name 1.3.10
  • platformdirs 3.0.0
  • pluggy 1.0.0
  • ply 3.11
  • pprintpp 0.4.0
  • prance 0.21.8.0
  • pydantic 1.10.13
  • pygments 2.15.0
  • pyproject-hooks 1.0.0
  • pyrsistent 0.19.3
  • pysnooper 1.1.1
  • pytest 7.4.3
  • pytest-clarity 1.0.1
  • pytest-cov 4.1.0
  • pytest-sugar 0.9.7
  • pyyaml 6.0.1
  • requests 2.31.0
  • rfc3986 1.5.0
  • rich 13.3.3
  • ruamel-yaml 0.17.21
  • ruamel-yaml-clib 0.2.7
  • ruff 0.1.6
  • semver 2.13.0
  • six 1.16.0
  • sniffio 1.3.0
  • termcolor 2.2.0
  • toml 0.10.2
  • tomli 2.0.1
  • typed-ast 1.5.4
  • types-pyyaml 6.0.12.12
  • types-requests 2.31.0.10
  • typing-extensions 4.8.0
  • urllib3 2.0.7
  • zipp 3.14.0
pyproject.toml pypi
  • pydantic >=1.7,<2.0
  • python >=3.8,<4
  • pyyaml >=6.0
  • requests *