A lightweight, powerful, and flexible workflow engine that executes tasks defined in YAML configuration files
Project description
YAML Workflow
A lightweight, powerful, and flexible workflow engine that executes tasks defined in YAML configuration files. Create modular, reusable workflows by connecting tasks through YAML definitions, with support for parallel processing, batch operations, and state management.
Why yaml-workflow?
Most workflow tools (Airflow, Prefect, Dagster) are designed for distributed cloud infrastructure with complex server setups. yaml-workflow takes a different approach:
| yaml-workflow | Airflow / Prefect / Dagster | |
|---|---|---|
| Setup | pip install yaml-workflow |
Server, database, scheduler, workers |
| Configuration | Plain YAML files | Python DAGs + infrastructure config |
| Dependencies | 3 (PyYAML, Jinja2, Click) | 50+ packages, Docker, PostgreSQL |
| Use case | Local automation, scripts, CI/CD, data pipelines | Enterprise orchestration at scale |
| Learning curve | Minutes | Hours to days |
| State | File-based, resumable | Database-backed |
Choose yaml-workflow when you need:
- Simple task automation without infrastructure overhead
- Reproducible pipelines defined in version-controlled YAML
- Batch processing with parallel execution
- State persistence and workflow resume after failures
- A lightweight alternative to shell scripts with better error handling
Features
- YAML-driven workflow definition with Jinja2 templating
- Multiple task types: shell, Python, file, template, HTTP, batch
- Parallel execution with configurable worker pools
- State persistence and resume capability
- Dry-run mode to preview without executing
- Workflow visualization (ASCII and Mermaid)
- Retry mechanisms with configurable strategies
- Namespaced variables (
args,env,steps,batch) - Flow control with custom step sequences and conditions
- Extensible task system via
@register_taskdecorator
Quick Start
# Install
pip install yaml-workflow
# Initialize example workflows
yaml-workflow init
# Run a workflow with parameters
yaml-workflow run workflows/hello_world.yaml name=Alice
Example workflow (hello_world.yaml):
name: Hello World
description: A simple greeting workflow
params:
name:
type: string
default: World
steps:
- name: create_greeting
task: template
inputs:
template: "Hello, {{ args.name }}!"
output_file: greeting.txt
- name: show_greeting
task: shell
inputs:
command: cat greeting.txt
Visualize workflows
yaml-workflow visualize workflows/data_pipeline.yaml
Workflow: Data Pipeline
┌─────────────────┐
│ detect_format │
│ python_code │
└─────────────────┘
│
▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ process_json │ │ process_csv │ │ process_xml │ │handle_unknown│
│ shell │ │ shell │ │ shell │ │ shell │
└──────────────┘ └──────────────┘ └──────────────┘ └──────────────┘
│
▼
┌─────────────────┐
│ generate_report │
│ python_code │
└─────────────────┘
Adjacent conditional steps are automatically grouped as branches. Use --format mermaid to export for docs or GitHub rendering.
Dry-run mode
Preview what a workflow would do without executing anything:
yaml-workflow run workflows/hello_world.yaml name=Alice --dry-run
[DRY-RUN] Workflow: Hello World
[DRY-RUN] Steps: 2 to execute
[DRY-RUN] Step 'create_greeting' — task: template — WOULD EXECUTE
template: Hello, Alice!
output_file: greeting.txt
[DRY-RUN] Step 'show_greeting' — task: shell — WOULD EXECUTE
command: cat greeting.txt
[DRY-RUN] Complete. 2 step(s) would execute, 0 would be skipped.
[DRY-RUN] No files were written. No tasks were executed.
More commands
# List available workflows
yaml-workflow list
# Validate a workflow
yaml-workflow validate workflows/hello_world.yaml
# Resume a failed workflow
yaml-workflow run workflows/hello_world.yaml --resume
Documentation
Full documentation is available at orieg.github.io/yaml-workflow.
- Getting Started - Installation and first workflow
- Task Types - Shell, Python, file, template, and batch tasks
- Workflow Structure - YAML configuration reference
- Templating - Jinja2 variable substitution
- State Management - Persistence and resume
- Task Development - Creating custom tasks
- API Reference - Full API documentation
Contributing
Contributions are welcome! See the Contributing Guide for development setup and guidelines.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yaml_workflow-0.5.0.tar.gz.
File metadata
- Download URL: yaml_workflow-0.5.0.tar.gz
- Upload date:
- Size: 65.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f12b23215d1896833405542aa97247222146cb82f0e0253c7c9299392bda06b4
|
|
| MD5 |
4f458f8369cde564b73f463eb8723edd
|
|
| BLAKE2b-256 |
3290c0cde4820cdbb8624c1381789cd23cee00f96dd3117f446938b0c82db803
|
Provenance
The following attestation bundles were made for yaml_workflow-0.5.0.tar.gz:
Publisher:
publish.yml on orieg/yaml-workflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yaml_workflow-0.5.0.tar.gz -
Subject digest:
f12b23215d1896833405542aa97247222146cb82f0e0253c7c9299392bda06b4 - Sigstore transparency entry: 1192120119
- Sigstore integration time:
-
Permalink:
orieg/yaml-workflow@feb4ee9eb7f9cfc3e1f6f99ade9ff68eeda9ecb9 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/orieg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@feb4ee9eb7f9cfc3e1f6f99ade9ff68eeda9ecb9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file yaml_workflow-0.5.0-py3-none-any.whl.
File metadata
- Download URL: yaml_workflow-0.5.0-py3-none-any.whl
- Upload date:
- Size: 82.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36f0dac968d5f3dde9c63e4b5c3027a40713cb3bba542ad69878ea7e49a52931
|
|
| MD5 |
498dd783cd35c8345d199b5782ce03e2
|
|
| BLAKE2b-256 |
ec9b365b66739b2df2b62a27fd39c71ed1c9d5d410e856c189269e07c5b5d862
|
Provenance
The following attestation bundles were made for yaml_workflow-0.5.0-py3-none-any.whl:
Publisher:
publish.yml on orieg/yaml-workflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yaml_workflow-0.5.0-py3-none-any.whl -
Subject digest:
36f0dac968d5f3dde9c63e4b5c3027a40713cb3bba542ad69878ea7e49a52931 - Sigstore transparency entry: 1192120121
- Sigstore integration time:
-
Permalink:
orieg/yaml-workflow@feb4ee9eb7f9cfc3e1f6f99ade9ff68eeda9ecb9 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/orieg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@feb4ee9eb7f9cfc3e1f6f99ade9ff68eeda9ecb9 -
Trigger Event:
push
-
Statement type: