Skip to main content

ArgoFlow

A Python library for building Argo Workflows in pure object oriented programming style.

Description

ArgoFlow provides a simple and intuitive Python API for creating Argo Workflows without writing YAML (which I dislike to my core). It allows you to define workflows, tasks, dependencies and artifacts using Python code, making it easier to build dynamic and complex workflows without ever touching YAML.

But if you do still want more granular control, you can use it to generate intermediate Workflow objects as well, for validation or sanity checks, instead of directly submitting the them from the Python script.

Installation

pip install argoflow

Quick Start

from argoflow import Workflow, WorkflowTask

# Create a workflow
workflow = Workflow(
    name="my-workflow",
    workflow_server_url="argo-server.example.com",
    namespace="default"
)

# Define tasks
task1 = WorkflowTask(
    name="task-1",
    template="task-1",
    image="python:3.9",
    script="print('Hello from task 1')"
)

task2 = WorkflowTask(
    name="task-2",
    template="task-2",
    image="python:3.9",
    script="print('Hello from task 2')",
    depends_on=[task1]
)

# Add tasks to workflow
workflow.add_tasks(task1, task2)

# Build and save workflow
workflow.save_to_file("workflow.json")

# Submit workflow to Argo
workflow.run_workflow(
    serverUrl="argo-server.example.com",
    executorToken="your-token-here"
)

Features

  • Object oriented workflow creation
  • Task dependencies and DAG construction
  • Input/output artifact management
  • Resource allocation (CPU, memory)
  • Environment variables and configuration
  • Script execution from files or inline code
  • Workflow submission to Argo server

Documentation

For submitting feature requests and contributing to the project, please visit the GitHub repository.

License

This project is licensed under the MIT License.

Metadata

Release files for argoflow 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for argoflow 0.2.1
File Size Uploaded
argoflow-0.2.1.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for argoflow 0.2.1
File Interpreter ABI Platform
argoflow-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.0 kB

Release files / argoflow-0.2.1.tar.gz

Download URL argoflow-0.2.1.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e254a32fcd2a70adc49df2d0986e1a8bf9b3796c5a67c67e493c1b16bd06c8b9
BLAKE2b-256 checksum
How to use checksums
60f6ac3c706de93f10eec368aa9239f829e0863d8fe6aaba010b8e915eb4ea36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / argoflow-0.2.1-py3-none-any.whl

Download URL argoflow-0.2.1-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd89d718b40e8cff39ab3ff196e6de2a90c25911c910a603479ab0eada2cd826
BLAKE2b-256 checksum
How to use checksums
6f63d14dd22f456597dc3d86ec561efdcf5c93d6a07608ed3c97d3588114b712
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page