hera  by argoproj-labs

Python SDK for Argo Workflows orchestration

Created 3 years ago
772 stars

Top 45.3% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Hera is a Python SDK designed to simplify the orchestration of Argo Workflows on Kubernetes. It allows developers to define, construct, and submit complex workflows entirely within Python, abstracting away the complexities of YAML configuration and Kubernetes manifests. This enables Python developers to leverage Argo Workflows' powerful scheduling and execution capabilities for containerized tasks.

How It Works

Hera translates Python functions and classes into Argo Workflow CRDs (Custom Resource Definitions). It uses decorators like @script() to convert Python functions into reusable "Script templates" that can be executed within containers. Workflow logic, such as DAGs (Directed Acyclic Graphs) and sequential task dependencies, is defined using Python's familiar syntax, which Hera then serializes into the Argo Workflows specification. This approach offers a more intuitive and Pythonic way to build and manage distributed workflows compared to direct YAML authoring.

Quick Start & Requirements

  • Installation: pip install hera
  • Prerequisites: An operational Argo Workflows server deployed on a Kubernetes cluster. Authentication is typically handled via Bearer tokens or port-forwarding to the Argo server.
  • Optional Dependencies: hera[yaml] for YAML output, hera[cli] for experimental CLI features, hera[experimental] for experimental features.
  • Resources: Requires a Kubernetes cluster with Argo Workflows installed.
  • Documentation: Quick Start guide

Highlighted Details

  • Native Python integration for defining Argo Workflows.
  • Supports DAGs and sequential task dependencies via Python syntax.
  • Enables conversion of Python functions into containerized script templates.
  • Offers optional YAML output and experimental CLI for GitOps practices.

Maintenance & Community

Hera is part of the argoproj-labs organization, indicating a connection to the broader Argo Project ecosystem. The project acknowledges "Emeritus Maintainers" who have significantly contributed. Presentations at KubeCon/ArgoCon events highlight active community engagement and adoption in various domains, including data science and gene therapy research.

Licensing & Compatibility

Hera is licensed under the Apache 2.0 license. This permissive license allows for commercial use and integration with closed-source projects without requiring the derived work to be open-sourced.

Limitations & Caveats

The CLI features are explicitly marked as experimental and subject to change. While Hera simplifies workflow creation, a fundamental understanding of Argo Workflows and Kubernetes is still beneficial for effective deployment and debugging.

Health Check
Last Commit

4 days ago

Responsiveness

1 day

Pull Requests (30d)
31
Issues (30d)
14
Star History
15 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.