Skip to main content

Piply

Piply is a lightweight Python pipeline framework for teams that want YAML-defined workflows, schedules, retries, logs, sensors, and an operations UI without running a heavy orchestration stack.

It stays small on purpose:

  • local dependency-aware DAG execution
  • SQLite by default for runs, logs, task outputs, queue state, and sensors, with optional PostgreSQL when you'd rather keep state in a managed database
  • FastAPI plus server-rendered UI
  • no Redis, Celery, Airflow, Prefect, or external queue required

Features

Authoring

  • Multi-task pipelines with depends_on
  • Python script, Python callable, CLI, API, webhook, email, and SSH tasks
  • Reusable YAML variables with {name} interpolation
  • .env, environment variables, explicit secrets, and reusable SQL connections
  • Metadata-driven entities expansion for reusable task templates
  • Optional pipeline_templates and pipeline_deployments for tenant reuse
  • Lightweight conditional execution: run_if: "{report} == 'payment'"
  • Conditional variable values: active_browser: true if env == "dev" else false
  • Declared artifacts: artifacts: ["out/*.csv"]

Execution

  • Task priority, via priority: high, priority: "***", or an extract***: id
  • Entity priority, via a payment* / adjustment** suffix on entity values
  • Task and pipeline timeouts with a configurable kill grace period
  • Per-task upstream failure behavior: skip, fail, or continue
  • Task output passing through context["task_id"]
  • Downstream pipelines inherit upstream variables, env, and outputs
  • Every run stores its full runtime configuration, so a downstream run can be retried or replayed without re-running the upstream chain

Operations

  • Schedules, sensors, retries, cancellation, reruns, and searchable logs
  • Dry-run preview: piply plan, plus an in-UI execution preview
  • Manual runs prompt for {placeholder} values an upstream would normally supply
  • Live log streaming: piply logs --follow with pipeline/run/task filters
  • Retention and cleanup: piply prune with automatic SQLite VACUUM
  • Backfill a single run or a whole schedule window
  • Graceful shutdown and startup recovery — no orphaned RUNNING records
  • Prometheus metrics at GET /metrics and a runtime Diagnostics page
  • Airflow-style pipeline listing with template grouping, sorting, and filtering
  • Last-five-runs status dots on every pipeline row, each linking to its run
  • Optional PostgreSQL metadata store: PIPLY_DATABASE=postgresql://...
  • Accounts, roles, and per-pipeline view/edit/run permissions
  • Central SMTP configured once, reused by email tasks and run notifications
  • Runs page with filters, sorting, and full multi-level trigger lineage

Quick Start

pip install -e .
copy .env.example .env
piply validate --config piply-demo/piply.yaml
piply start --config piply-demo/piply.yaml

Open http://127.0.0.1:8000.

Run on a different port when 8000 is already in use:

piply start --config piply-demo/piply.yaml --port 8080
piply start --config piply-demo/piply.yaml --host 0.0.0.0 --port 8080

Create a starter workspace:

piply init my-piply-project
piply run extract_flow --config my-piply-project/piply.yaml --wait

Minimal YAML

version: "1"
title: Piply Workspace
workspace: .

variables:
  scripts_dir: pipelines
  batch_id: demo-batch

connections:
  app_db: sqlite:///sensor_demo.db

pipelines:
  extract_flow:
    schedule:
      every: 15m
    retry:
      attempts: 2
      mode: resume
      delay_seconds: 10
    triggers_on_success:
      - report_flow
    tasks:
      extract:
        type: python
        path: "{scripts_dir}/extract.py"
        function: extract_data

      transform:
        type: python
        path: "{scripts_dir}/extract.py"
        function: transform_data
        depends_on: [extract]

      validate:
        type: cli
        command: python {scripts_dir}/validate_cli.py {batch_id}
        cwd: .
        depends_on: [transform]

  report_flow:
    tasks:
      build_report:
        type: python
        path: "{scripts_dir}/report.py"
        function: build_report

Python callable tasks can consume upstream outputs:

def transform_data(context):
    extracted = context["extract"]
    return {"records": extracted["records"] + 1}

For plain commands, omit shell so Piply uses the platform default shell. Set shell: bash only for Bash-specific syntax and only on machines where Bash is installed and available on PATH:

tasks:
  load_env_and_run:
    type: cli
    shell: bash
    command: set -a && source .env && set +a && conda run -n py312_extract python {scripts_dir}/job.py
    cwd: .

Dynamic Entity Mapping

Use entities when one task template should run once per business value. Piply expands templates at runtime into normal DAG tasks, so existing retries, logs, outputs, and parallel execution continue to work.

pipelines:
  extract_flow:
    entities:
      report:
        - payment
        - adjustment
        - refund
    max_parallel_tasks: 3
    tasks:
      extract:
        type: python
        path: pipelines/extract.py
        function: extract_data
        kwargs:
          report: "{report}"

      validate:
        type: cli
        command: python validate.py --report {report}
        depends_on: [extract]

Runtime tasks are generated as payment.extract -> payment.validate, adjustment.extract -> adjustment.validate, and refund.extract -> refund.validate.

Advanced Deployments

Simple pipelines: YAML remains the default. For repeated tenant or environment rollouts, define a reusable template and deployment-specific schedules or variables:

pipeline_templates:
  report_pipeline:
    tasks:
      extract:
        type: python
        path: pipelines/extract.py
        function: extract_data
        kwargs:
          tenant: "{tenant}"

pipeline_deployments:
  client_a_reporting:
    template: report_pipeline
    schedule:
      every: 15m
    variables:
      tenant: client_a

  client_b_reporting:
    template: report_pipeline
    schedule:
      cron: "0 * * * *"
    tenant: client_b

Each deployment becomes a normal runnable pipeline id, so the scheduler, UI, CLI, and API keep working without a second execution model.

Deployment Variables In Downstream Pipelines

Variables from a deployment are automatically passed to a downstream pipeline started through triggers_on_success. This is useful when several deployments share one downstream workflow. Parent deployment variables take precedence for the triggered run.

A manual run has no parent to inherit from, so it uses the downstream pipeline's own variables or top-level defaults. When that leaves a {placeholder} with no value, Piply asks for it rather than running the command literally — see Missing runtime values.

pipelines:
  Bronze_to_Silver:
    tasks:
      dbt:
        type: cli
        command: DBT_CLIENT={practice} dbt run --selector appointment_silver

pipeline_templates:
  ECW_Extract_test:
    tasks:
      extract:
        type: cli
        command: echo extract

pipeline_deployments:
  BENNETT_ETL_Flow:
    template: ECW_Extract_test
    variables:
      practice: BENNETT
    triggers_on_success: [Bronze_to_Silver]

When BENNETT_ETL_Flow succeeds, Piply runs Bronze_to_Silver with DBT_CLIENT=BENNETT. A deployment for PALOS would use the same target and set practice: PALOS.

Common CLI

# Project
piply --version
piply init my-piply-project
piply validate --config piply-demo/piply.yaml
piply list --config piply-demo/piply.yaml
piply plan extract_flow --config piply-demo/piply.yaml     # dry run, nothing executes

# Running
piply run extract_flow --config piply-demo/piply.yaml --wait
piply run extract_flow --tenant acme --param batch=2026-05-26
piply run Bronze_to_Silver --var practice=BENNETT       # fill a {placeholder}
piply run Bronze_to_Silver --prompt                     # or be asked for them
piply tasks list extract_flow
piply tasks run extract_flow validate --tenant acme --param region=west
piply tasks retry <run_id> <task_id> --mode resume

# Inspecting
piply runs --limit 20
piply logs <run_id>
piply logs --follow --pipeline extract_flow                # live, colored
piply artifacts <run_id>
piply diagnostics

# Maintaining
piply backfill <run_id>                                    # replay a run's config
piply backfill nightly --from 2026-07-01 --to 2026-07-08   # fill a schedule window
piply prune --dry-run
piply prune --run-days 14 --max-runs 100
piply backup /backups                                      # safe while running
piply restore /backups/piply-20260804T074211Z.db           # stop the server first
piply migrate-db --to postgresql://piply@db:5432/piply     # SQLite -> PostgreSQL

# Serving
piply users create admin --role admin                       # switches auth on
piply users grant alice nightly=view,run
piply pause extract_flow
piply resume extract_flow
piply start --config piply-demo/piply.yaml --port 8080
piply stop --config piply-demo/piply.yaml

Docs

Using Piply

Understanding Piply

Metadata Store

Piply keeps its own runtime state in SQLite by default, with nothing to configure. Point it at PostgreSQL when you would rather that state lived in a managed database, for example so a container redeploy cannot lose it:

pip install "mr-piply[postgres]"
export PIPLY_DATABASE="postgresql://piply:secret@db.internal:5432/piply"
piply start

The schema is created and migrated automatically, and no pipeline configuration changes. piply backup / piply restore remain SQLite-only; use pg_dump and pg_restore for PostgreSQL. Run one Piply instance per database either way.

Already running on SQLite and want to keep the history? Stop the server and copy it across:

piply migrate-db --to "postgresql://piply:secret@db.internal:5432/piply"

Run ids are preserved, so retry chains, downstream lineage, and accounts all survive. Full details, the Docker volume setup for the SQLite default, and a column-by-column schema reference are in Metadata Store.

Monitoring

curl -s http://127.0.0.1:8000/metrics
curl -s http://127.0.0.1:8000/api/diagnostics

/metrics exposes run and task counts by status, running tasks, queue depth and age, scheduler health, run durations, and per-sensor health in the Prometheus text format. It accepts the API bearer token, so a scraper does not need UI credentials.

Roadmap

Proposed features, ranked by value against cost, with the reasoning for what is deliberately not planned: Future Features.

Metadata

Release files for mr-piply 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 mr-piply 0.2.1
File Size Uploaded Provenance Actions
mr_piply-0.2.1.tar.gz 228.9 kB Without provenance Details for mr_piply-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 445.4 kB

Release files / mr_piply-0.2.1.tar.gz

Download URL mr_piply-0.2.1.tar.gz
Size 228.9 kB
Tags Source
SHA-256 checksum
How to use checksums
11b8a867a739526a03e969e3f9ab7e3fb31aacd3f3f9d4e2511b6e44c26e483d
BLAKE2b-256 checksum
How to use checksums
117fcaea8a565db3730585c62d3ac79d54aec3d7883e5f5028e1029bb907dfda
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.15

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

Download URL mr_piply-0.2.1-py3-none-any.whl
Size 216.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
11f5847ed2a3468d3be80820fb0eb8731e9e320a0cf4374ea74b0c12dbca619f
BLAKE2b-256 checksum
How to use checksums
4e51aea8609bb5b3322444921a88bcce5161bf63ee35ffe6a5a6ecafcadeb926
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.15

Security for mr-piply 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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