taskflow
Taskflow structured state management library.
What it is and what it does
TaskFlow is a structured state management library designed to orchestrate jobs, tasks, and flows in a declarative, highly available manner. It provides a framework for defining workflows as directed acyclic graphs of tasks, with built-in support for error recovery, rollback, and persistence. The library is part of the OpenStack ecosystem but is general-purpose and can be used in any Python project that needs reliable task execution.
The package ships with core execution capabilities and a pluggable architecture for optional backends: persistence layers (e.g., sqlalchemy), execution engines (e.g., worker-based via kombu), and job boards (e.g., kazoo-based). Most of these are opt-in extras; the base installation provides in-memory execution and local task scheduling. It depends on networkx for graph representation, stevedore for plugin management, and oslo libraries for serialization and utilities.
Use it for:
- Build reliable ETL pipelines with automatic retry and rollback on failure.
- Orchestrate multi-step deployment or provisioning workflows in cloud infrastructure.
- Define complex job dependencies and execute them across distributed worker pools.
- Implement long-running background job queues with persistence and recovery.
- Model state transitions and task workflows in microservice architectures.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
TaskFlow is a library for defining and executing workflows as structured state machines, with support for task composition, error handling, persistence, and distributed execution across multiple workers.
Yes, if you need declarative workflow orchestration with built-in fault tolerance and persistence. TaskFlow is production-stable (since 2013), actively maintained, has low install friction, and carries a permissive license. Its 13 runtime dependencies are manageable for most environments. Install it if you're building task-driven systems; skip it if you only need simple job queuing or one-off script execution.
Install
taskflow on PyPI
pip
pip install taskflowuv
uv add taskflowpoetry
poetry add taskflowInstalling taskflow
Before you install
Low friction installation with a pure-Python wheel. Actively maintained (last release 88 days ago). Requires 13 runtime dependencies including networkx, stevedore, and oslo libraries; optional extras like workers, sqlalchemy, and kazoo backends are available for specialized use cases.
License in practice
Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions; suitable for most proprietary and open-source projects.
Quickstart
pip install taskflow
from taskflow import task, flow
class MyTask(task.Task):
def execute(self):
return "result"
my_flow = flow.Flow('my-flow').add(MyTask())
my_flow.run()
Requires Python 3.10 or later. Optional persistence and worker backends (sqlalchemy, kombu, kazoo) must be installed separately via extras if needed.
Verify before relying
- Whether the 13 runtime dependencies are all strictly necessary for basic workflow execution or if many are only needed for optional backends.
- Performance characteristics and scalability limits for large task graphs or high-frequency execution.
- Compatibility with async/await patterns or whether it is callback/synchronous-only.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 13 — pbr, debtcollector, futurist, fasteners, networkx, stevedore, jsonschema, automaton, oslo.utils, oslo.serialization, tenacity, cachetools, pydot |
| Maintenance | actively maintained — 88 days since the last release |
| First released | |
| Downloads | 176,421/month — #10,242 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: taskflow-6.3.0-py3-none-any.whl
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
craft-partsCraft Parts provides a declarative framework…
unclear · top 15,000 on PyPI
python-mistralclientPython client library and command-line…
permissive · top 15,000 on PyPI
automatonAutomaton provides state machine classes and…
permissive · top 15,000 on PyPI
taskcluster-taskgraphTaskgraph generates and submits task graphs to…
copyleft · top 5,000 on PyPI
eventsourcingEventsourcing is a Python library for…
permissive · top 15,000 on PyPI
futuristFuturist provides futures utilities and…
permissive · top 15,000 on PyPI
jobflowJobflow is a Python library for defining and…
permissive · top 15,000 on PyPI
langflowLangflow is a visual platform for building,…
permissive · top 15,000 on PyPI
celeryCelery is a distributed task queue that lets…
permissive · top 1,000 on PyPI
promptflow-coreExecutes prompt flow workflows with minimal…
permissive · top 15,000 on PyPI