Kestra vs. Luigi : A Python library for batch job dependencies vs. an orchestration platform with schedules, triggers and a UI.

Luigi is a Python module from Spotify for building pipelines of batch jobs, where each task declares its dependencies and the output it produces. Kestra is an orchestration platform that runs YAML flows with built-in schedules, event triggers and a UI.

Luigi or Kestra?

Luigi is the better fit if

  • Your pipelines are Python batch jobs that write files or tables, and you rely on Luigi skipping tasks whose output already exists.
  • You want a library you install with pip, plus a small central scheduler, and no database to run.
  • Your jobs already use Luigi's contrib modules for Hadoop, Spark, BigQuery or Redshift, and they work.

Choose Kestra if

  • Schedules, retries, event triggers and alerts should live in the orchestrator, out of cron entries and config files.
  • Steps are written in SQL, shell, dbt or other languages as well as Python.
  • People beyond the original authors need run history, logs and failures in a UI.

How do Luigi and Kestra compare, feature by feature?

Workflow definition Python classes that subclass luigi.Task YAML flows, edited in code or in the no-code editor
Dependencies requires() returns upstream tasks; output() targets mark completion Task order in the flow, plus Parallel, Loop and Subflow tasks
Scheduling None built in; cron or another scheduler starts each run Schedule trigger with backfills
Event triggers None built in; cron can poll for new data Webhook, file, message queue and database triggers
Re-running work Tasks whose output targets exist are skipped Replay an execution or restart it from the failed task
Retries retry_count, retry_delay and disable_window in the scheduler config A retry block per task or per flow
Execution The worker process runs each run() itself; luigid runs nothing Workers run tasks in processes or containers, or on Kubernetes and cloud batch services
UI Visualiser with task status and the dependency graph; task history is experimental Flow editor, execution history, logs, Gantt view and metrics
Alerts Error emails through SMTP, SendGrid, SES or SNS Slack, Teams, email and other notification tasks in an errors block
Project Apache 2.0, maintained by Spotify's Data Team, 18k+ GitHub stars Apache 2.0, 30k+ GitHub stars

Which teams moved their Python batch jobs and cron to Kestra?

Travel

70% less manual data processing at Airpaz, with Kestra running its Python ingestion across 10 connected sources.

Thank you for your hard work in creating this good software. It is beginner-friendly and easy to customize.

Daniel Theodorus

Read the story

Travel

2x team efficiency at Copines de Voyage after cron jobs and PHP scripts were replaced by Kestra, dbt and BigQuery.

The experience with Kestra is just awesome.

Thomas Tourlourat

Read the story

How are Luigi and Kestra built?

Luigi is a library that your own processes run. Kestra is a server that owns scheduling, execution and history.

  • Luigi: a Python library and a central scheduler

    A pipeline is a set of Task classes. When a run starts, the worker process walks requires() back to the tasks whose outputs are missing and calls run() on each of them in that same process.

    • luigid keeps two workers from running the same task
    • A task counts as complete when its output targets exist
    • cron or another scheduler starts each run
    • RangeDaily fills in missed dates each time cron calls it
  • Kestra: a server that runs flows

    Kestra runs a scheduler, an executor and workers as one process or as separate services. Every execution's state, logs and outputs are stored, so the UI and API can show what ran and why it failed.

    • The scheduler fires schedules, polling triggers and realtime triggers
    • The executor picks the next task and applies retries
    • Workers run scripts in containers with per-task dependencies
    • Backfills replay missed schedule intervals between two dates

What does the same batch job look like in each?

The same job in both: download a day of orders from an API, then total them per store into a CSV, once a day (from cron for Luigi, from a Schedule trigger for Kestra).

Get started with Kestra
Luigi tasks store_totals.py
1import csv2from collections import defaultdict34import luigi5import requests678class FetchOrders(luigi.Task):9    date = luigi.DateParameter()1011    def output(self):12        return luigi.LocalTarget(f"data/orders_{self.date}.csv")1314    def run(self):15        response = requests.get(f"https://api.example.com/orders?date={self.date}", timeout=30)16        response.raise_for_status()17        with self.output().open("w") as out:18            out.write(response.text)192021class StoreTotals(luigi.Task):22    date = luigi.DateParameter()2324    def requires(self):25        return FetchOrders(self.date)2627    def output(self):28        return luigi.LocalTarget(f"data/store_totals_{self.date}.csv")2930    def run(self):31        totals = defaultdict(float)32        with self.input().open() as orders:33            for row in csv.DictReader(orders):34                totals[row["store"]] += float(row["amount"])35        with self.output().open("w") as out:36            csv.writer(out).writerows(totals.items())
/ Flows / store_totals
1id: store_totals2namespace: company.retail34tasks:5  - id: fetch_orders6    type: io.kestra.plugin.core.http.Download7    uri: "https://api.example.com/orders?date={{ trigger.date ?? execution.startDate | date('yyyy-MM-dd') }}"89  - id: store_totals10    type: io.kestra.plugin.scripts.python.Script11    inputFiles:12      orders.csv: "{{ outputs.fetch_orders.uri }}"13    outputFiles:14      - store_totals.csv15    script: |16      import csv17      from collections import defaultdict1819      totals = defaultdict(float)20      with open("orders.csv") as orders:21          for row in csv.DictReader(orders):22              totals[row["store"]] += float(row["amount"])23      with open("store_totals.csv", "w", newline="") as out:24          csv.writer(out).writerows(totals.items())2526triggers:27  - id: daily28    type: io.kestra.plugin.core.trigger.Schedule29    cron: "@daily"

What does it take to get Luigi and Kestra running?

Luigi installs with pip. Kestra starts with Docker Compose.

Luigi Cron required
$pip install luigi python-daemon$luigid --background --pidfile luigid.pid --logdir logs --state-path luigi-state.pickle$luigi --module store_totals StoreTotals --date 2026-11-01

The central scheduler serves the visualiser on port 8082 and keeps two workers from running the same task. It runs nothing itself, so cron or another scheduler starts each run.

Kestra Database included
$curl -o docker-compose.yml https://raw.githubusercontent.com/kestra-io/kestra/develop/docker-compose.yml$docker compose up

One Compose file starts Kestra and its Postgres database. Open localhost:8080, pick a blueprint and run it. Production runs the same image on Kubernetes with the Kestra Helm chart.

How hard is it to move from Luigi to Kestra?

Leaving Luigi

Each Task class mixes the graph with the work. requires() and output() describe the pipeline, run() holds the logic, and parameters such as dates tie the two together. The logic moves almost as it is, while the graph, targets and parameters are declared again in the flow.

Moving to Kestra

run() bodies become Python script tasks, requires() chains become task order, and DateParameter values come from the trigger date. Cron entries become Schedule triggers, and the gaps RangeDaily used to fill become backfills. Luigi's output-based skipping has no direct equivalent, so decide per pipeline whether a rerun overwrites its output or checks for it first.

How do Luigi and Kestra compare on licensing, pricing and self-hosting?

Both projects are open source under Apache 2.0 and run on your own machines.

Luigi

Apache 2.0, built at Spotify and maintained by Spotify's Data Team, with regular releases on PyPI. You install it with pip and run luigid, your workers and cron on your own machines.

Kestra

Apache 2.0 and free to self-host, with no limits on flows or executions. Kestra Cloud is billed on usage, and Kestra Enterprise is licensed per instance. Both are on the pricing page.

Three ways to run Kestra

Try it alone, try it managed, or talk to an expert who has done the migration before.

Kestra Core

Open Source

Where most teams start, and where many experiment with a first production. Self-hosted and free, with no limits on flows or executions.

Get started

Kestra Cloud

Early Access

Managed by the people who build Kestra. No platform to run, pay for what you use.

Try Kestra Cloud
Find the edition that fits your team

Questions from Luigi teams

SOC 2 GDPR

SOC 2 Type 2 and GDPR, independently audited. The report is available on request.

Security overview