Skip to main content

A Python library for building Argo Workflows programmatically

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

argoflow-0.2.1.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

argoflow-0.2.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file argoflow-0.2.1.tar.gz.

File metadata

  • Download URL: argoflow-0.2.1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for argoflow-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e254a32fcd2a70adc49df2d0986e1a8bf9b3796c5a67c67e493c1b16bd06c8b9
MD5 4bb7a86f1d16cd7ecd69b6473006fa09
BLAKE2b-256 60f6ac3c706de93f10eec368aa9239f829e0863d8fe6aaba010b8e915eb4ea36

See more details on using hashes here.

File details

Details for the file argoflow-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: argoflow-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for argoflow-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cd89d718b40e8cff39ab3ff196e6de2a90c25911c910a603479ab0eada2cd826
MD5 caa1f6e56ff4ea96b6bda8f8c8ad20b7
BLAKE2b-256 6f63d14dd22f456597dc3d86ec561efdcf5c93d6a07608ed3c97d3588114b712

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page