Skip to main content

Enterprise-Grade Workflow Orchestration for Python

Project description

AirFlan

Enterprise-Grade Workflow Orchestration for Python

AirFlan is a lightweight, modular, and robust workflow orchestrator designed for building complex data pipelines with ease. It combines a simple Pythonic API with powerful enterprise features like parallel execution, caching, retries, and a state-of-the-art monitoring dashboard.


Features

  • DAG Orchestration: Automatically resolves dependencies and executes tasks in topological order.
  • Parallel Execution: True parallel task processing using thread pools.
  • Robust Error Handling: Built-in retries, timeouts, and error propagation.
  • Smart Caching: Avoid redundant computation with result caching.
  • Context Sharing: Thread-safe data passing between tasks.
  • Enterprise UI: A professional, minimalist dashboard for real-time monitoring and visualization.
  • Modular Architecture: Extensible design with pluggable executors and storage backends.

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/airflan.git
    cd airflan
    
  2. Install dependencies:

    pip install -r requirements.txt
    

Local Development (Editable Install)

If you want to use AirFlan in another project locally without publishing to PyPI:

  1. Navigate to your other project's directory.
  2. Install AirFlan in editable mode:
    pip install -e /path/to/cloned/airflan
    
    (Replace /path/to/cloned/airflan with the actual path to this repository)

Quick Start

Define your workflow using the simple decorator API:

from airflan import WorkflowOrchestrator, WorkflowContext

# Initialize
wf = WorkflowOrchestrator(name="data_pipeline")

# Define Tasks
@wf.task(name="extract")
def extract_data():
    return [1, 2, 3]

@wf.task(name="process", depends_on=["extract"])
def process_data(context: WorkflowContext):
    # Access upstream data or shared context
    return "Processed"

# Run
if __name__ == "__main__":
    wf.run(parallel=True, enable_ui=True)

Monitoring Dashboard

AirFlan includes a professional real-time monitoring dashboard built with Streamlit.

To launch the UI, simply run your workflow with enable_ui=True. The dashboard provides:

  • Interactive DAG: Visualize your workflow structure.
  • Real-time Metrics: Track running, completed, and failed tasks.
  • Execution Logs: Live stream of task logs.
  • Performance Stats: Task duration and status distribution.

Project Structure

AirFlan/
├── airflan/               # Core Library
│   ├── core/              # Task, Scheduler, Executor, Context
│   ├── storage/           # Cache & State Management
│   └── orchestrator.py    # Main Entry Point
├── air_flan_ui.py         # Monitoring Dashboard
├── demo_workflow.py       # Example Enterprise Pipeline
└── requirements.txt       # Dependencies

Advanced Usage

Check out docs/how_to.md for detailed guides on:

  • Sequential vs. Parallel Execution
  • Context Management
  • Retry Policies & Timeouts
  • Result Caching

License

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

airflan_workflow-0.1.1.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

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

airflan_workflow-0.1.1-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file airflan_workflow-0.1.1.tar.gz.

File metadata

  • Download URL: airflan_workflow-0.1.1.tar.gz
  • Upload date:
  • Size: 18.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for airflan_workflow-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e91145d0462824c52580c744e8bdfb454b666150feb112c60eac945745f98ec9
MD5 b6037fe206d2dcb9899e3c14a2ebb113
BLAKE2b-256 d9f9ef2fee681b2a1f2e650d5d301415c8a72b8f927ce82475e1fde0acb1b015

See more details on using hashes here.

File details

Details for the file airflan_workflow-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for airflan_workflow-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b8ae2353dcef9d34b2f2f8b07a8547fb7ad6e451008f2ef4e4fdc4778e622e47
MD5 b501b0a25343107cdd174c0e3d4b7517
BLAKE2b-256 1fc9061f3301c3c4e7349eb354a088d8b434c6bcc49fbf76f8928a35cab13d66

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