Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

keelflow

The keel of your business flows — a reusable Postgres-native durable workflow engine. Reference Python implementation of the keelflow spec (spec/).

pip install keelflow (PyPI name: keelflow)

What it gives you

  • Durable jobs — transactional enqueue: job + outbox row commit with your data change, or nothing commits.
  • DAG workflows — needs/if: guards/${{ outputs }} refs, YAML or code definitions, human steps park a run until a person completes them.
  • Bulk imports — chunk + per-row status, atomic='chunk'|'row', kill-resume of pending rows only, error queue.
  • Human tasks — inbox (user:/role:), first-claim-wins, escalation.
  • Entity state machines — guarded transitions, creates_job / triggers_workflow hooks, allowed_actions.
  • Outbox events, audit, RBAC hooks, cron scheduling, key-serialized execution (concurrency_key), monitoring data APIs, minimal SuperAdmin UI, read-only MCP tools.

Kernel lifecycle (claim/retry/schedule) rides on Chancy; everything differentiating is built in-house.

Quickstart

docker run -d --name kf-pg -e POSTGRES_PASSWORD=postgres \
  -p 5544:5432 postgres:16-alpine
docker exec kf-pg createdb -U postgres keelflow

export KEELFLOW_DSN=postgresql://postgres:postgres@localhost:5544/keelflow
uv run python examples/order_flow.py   # applies schema + runs a demo flow

Full walkthrough of every feature: docs/guide.md. Complete demo app (SM + human tasks + DAG + failure paths): examples/invoice_flow.

Layout

  • src/keelflow/sdk/ — contracts apps implement (JobHandler, JobContext, specs)
  • src/keelflow/engine/ — dispatch, DAG resolver, registry, scheduler, state machine, bulk, events, audit, monitoring
  • src/keelflow/postgres/ — schema + storage
  • src/keelflow/compiler/ — YAML → DAG/state-machine compiler
  • src/keelflow/admin/ — minimal SuperAdmin (dev/ops, no auth)
  • src/keelflow/mcp/ — read-only agent tools
  • spec/ — language-agnostic keelflow spec (port to .NET/Java/PHP)
  • docs/architecture-design-brief.md — design source of truth
  • docs/plans/active/ — execution plan + acceptance evidence

Dev

uv sync --dev
uv run pytest          # needs Postgres at $KEELFLOW_TEST_DSN (default :5544/keelflow)
uv run ruff check src tests
uv run mypy src/keelflow

Admin UI: KEELFLOW_DSN=… uv run python -m keelflow.admin.app → http://127.0.0.1:8410 (read-only + retry button; no auth — bind locally).

Metadata

Release files for keelflow 0.1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for keelflow 0.1.0a1
File Size Uploaded Provenance Actions
keelflow-0.1.0a1.tar.gz 44.8 kB Without provenance Details for keelflow-0.1.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for keelflow 0.1.0a1
File Interpreter ABI Platform Actions
keelflow-0.1.0a1-py3-none-any.whl Python 3 none any Details for keelflow-0.1.0a1-py3-none-any.whl

Total release size: 102.4 kB

Release files / keelflow-0.1.0a1.tar.gz

Download URL keelflow-0.1.0a1.tar.gz
Size 44.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c33693965a377b971def2a576e2aae15ae70ca33fa4ff96177f6b93b97d79370
BLAKE2b-256 checksum
How to use checksums
191e9a9177c9e2062892f205e105acf2e1956aa6d3339c503eb0a6eab3db0f73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / keelflow-0.1.0a1-py3-none-any.whl

Download URL keelflow-0.1.0a1-py3-none-any.whl
Size 57.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d72a20560822a1097885122573229147404dfc23748e83be5ad85a351eb13fdf
BLAKE2b-256 checksum
How to use checksums
3749ce43c054dc7ce2a881079ade75b2c08c25f69725fb69d464c1c48d68fcb2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for keelflow 0.1.0a1

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