Built from scratch · No frameworks

Data pipelines,
orchestrated
your way.

A distributed pipeline orchestrator built from scratch in Python. DAG execution, parallel workers, persistent state, retry logic — all without magic.

terminal
$ pipekit run parallel_pipeline
[pipekit] Starting DAG: parallel_pipeline
[pipekit] Stage 1: [fetch_users, fetch_orders, fetch_products]
[worker-7] fetching users...
[worker-8] fetching orders...
[worker-1] fetching products...
[pipekit] Stage 2: [merge]
merging: users, orders, products
[pipekit] Stage 3: [save]
✓ DAG complete in 2.04s
$
3×
faster with parallel workers
5
task states tracked
2ⁿ
exponential backoff retry
100%
built from scratch
// how it works

From decorator
to execution.

Define tasks with @task, express dependencies, let pipekit handle the rest. It resolves your DAG, finds parallel opportunities, and executes across distributed workers.

⚙️
@task
decorator
🔗
DAG
dependencies
🧠
Scheduler
Kahn's algo
parallel wave
Worker 1
running
Worker 2
running
Worker N
running
💾
PostgreSQL
state saved
define your pipeline python
# define tasks with a decorator
@task
def fetch_users():
    return "users_data"

@task(retries=3)
def fetch_orders():
    return "orders_data"

@task
def merge(users, orders):
    return f"merged({users},{orders})"

# express dependencies
merge.depends_on(fetch_users, fetch_orders)

# run it
dag = Dag("my_pipeline")
dag.add_task(fetch_users)
dag.add_task(fetch_orders)
dag.add_task(merge)
dag.run()
or use the CLI bash
# trigger a pipeline
$ pipekit run my_pipeline

[pipekit] Starting DAG: my_pipeline
[pipekit] Stage 1: [fetch_users, fetch_orders]
  fetch_users: success
  fetch_orders: success
[pipekit] Stage 2: [merge]
  merge: success
✓ completed

# check status anytime
$ pipekit status my_pipeline
  fetch_users: success
  fetch_orders: success
  merge: success
// features

Everything you need.
Nothing you don't.

Every feature was built from scratch with a clear reason. No magic, no black boxes.

🔷

DAG Execution

Kahn's algorithm resolves dependencies and produces wave-based execution stages. Tasks in the same wave have no dependencies on each other.

⚡

True Parallelism

Tasks in the same wave are dispatched to Redis simultaneously. Separate Celery worker processes pick them up and run concurrently.

🔄

Exponential Backoff

Failed tasks retry with increasing wait times — 2s, 4s, 8s. Prevents hammering overloaded services and gives them time to recover.

💾

Persistent State

Every task transition — pending, running, success, failed — is written to PostgreSQL. Full audit trail, crash recovery built in.

📦

Artifact Passing

Task outputs flow automatically to downstream tasks as inputs. The artifact store is the shared memory of your pipeline.

⏰

Cron Scheduling

Pipelines run automatically on intervals or cron expressions. The scheduler watches the clock so you don't have to.

🌐

REST API

Trigger and monitor pipelines over HTTP. FastAPI provides automatic docs at /docs so you can test without writing a line of client code.

🖥️

CLI Tool

pipekit run and pipekit status work from any terminal. Installed as a proper system command via pyproject.toml entry points.

🔁

Cycle Detection

Kahn's algorithm automatically detects circular dependencies. If tasks would deadlock waiting for each other, pipekit raises an error immediately.

// architecture

Five layers.
One system.

Each layer has a single responsibility. Together they form a reliable, distributed pipeline engine.

Core

DAG Engine

The brain of pipekit. Parses @task decorators, builds the dependency graph, runs Kahn's algorithm to produce wave-based execution stages. Detects cycles before a single task runs.

Kahn's Algorithm Topological Sort Wave Execution
Queue

Task Queue

Redis acts as the message broker. Tasks in the same wave are dispatched simultaneously — non-blocking. Workers pick up messages independently, enabling true parallelism across processes.

Redis Celery Non-blocking dispatch
State

State Machine

Every task transitions through PENDING → RUNNING → SUCCESS or FAILED. Each transition is written to PostgreSQL immediately, giving you a persistent audit trail and enabling crash recovery.

PostgreSQL SQLAlchemy ACID guarantees
Interface

API + CLI

FastAPI exposes trigger and status endpoints with automatic Swagger docs. The Click-based CLI wraps the API for terminal use. Both are thin layers — all logic lives in the core.

FastAPI Click APScheduler
// tech stack

Built on solid
foundations.

Every technology was chosen for a specific reason — not because it was popular.

Python
Core language
FastAPI
REST API
PostgreSQL
State storage
Redis
Task broker
Celery
Worker system
// proof of parallelism

2 seconds.
Not 6.

Three tasks, each sleeping 2 seconds. Sequential execution takes 6s+. With Celery workers dispatched simultaneously — it takes 2 seconds. That's the proof.

Sequential (naive)

6.2s total
0s → 2s main thread fetch_users
2s → 4s main thread fetch_orders
4s → 6s main thread fetch_products

Parallel (pipekit)

2.04s total
0s → 2s ForkPoolWorker-7 fetch_users
0s → 2s ForkPoolWorker-8 fetch_orders
0s → 2s ForkPoolWorker-1 fetch_products