A distributed pipeline orchestrator built from scratch in Python. DAG execution, parallel workers, persistent state, retry logic — all without magic.
Define tasks with @task, express dependencies, let pipekit handle the rest. It resolves your DAG, finds parallel opportunities, and executes across distributed workers.
# 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()
# 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
Every feature was built from scratch with a clear reason. No magic, no black boxes.
Kahn's algorithm resolves dependencies and produces wave-based execution stages. Tasks in the same wave have no dependencies on each other.
Tasks in the same wave are dispatched to Redis simultaneously. Separate Celery worker processes pick them up and run concurrently.
Failed tasks retry with increasing wait times — 2s, 4s, 8s. Prevents hammering overloaded services and gives them time to recover.
Every task transition — pending, running, success, failed — is written to PostgreSQL. Full audit trail, crash recovery built in.
Task outputs flow automatically to downstream tasks as inputs. The artifact store is the shared memory of your pipeline.
Pipelines run automatically on intervals or cron expressions. The scheduler watches the clock so you don't have to.
Trigger and monitor pipelines over HTTP. FastAPI provides automatic docs at /docs so you can test without writing a line of client code.
pipekit run and pipekit status work from any terminal. Installed as a proper system command via pyproject.toml entry points.
Kahn's algorithm automatically detects circular dependencies. If tasks would deadlock waiting for each other, pipekit raises an error immediately.
Each layer has a single responsibility. Together they form a reliable, distributed pipeline 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.
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.
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.
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.
Every technology was chosen for a specific reason — not because it was popular.
Three tasks, each sleeping 2 seconds. Sequential execution takes 6s+. With Celery workers dispatched simultaneously — it takes 2 seconds. That's the proof.