Skip to content

Celery Director Documentation

Director is a simple and rapid framework used to manage tasks and build workflows using Celery.

Celery Director


The objective is to make Celery easier to use by providing :

  • a WebUI, an API and a CLI to manage and execute the workflows,
  • a WebUI to track the tasks states,
  • a YAML syntax used to combine tasks into workflows,
  • the ability to periodically launch a whole workflow,
  • and many others.


Director is built on top of the excellent Celery library. All the orchestration engine has not been changed : we didn't want to reinvent the wheel but provide an easy tool to use Celery.

It means that all your existing tasks can easily be migrated to Director. Furthermore the documentation of the tasks and all the features powered by Celery like the rate limiting, the task exception retrying or even the queue routing stay the same.


Install the latest version of Director with pip (requires at least Python 3.8):

pip install celery-director


Write your code in Python

# tasks/
from director import task
from .utils import Order, Mail

def order_product(*args, **kwargs):
    order = Order(
    return {"id":}

def send_mail(*args, **kwargs):
    order_id = args[0]["id"]
    mail = Mail(
      title=f"Your order #{order_id} has been received",

Build your workflows in YAML

# workflows.yml

Run it

You can simply test your workflow in local :

$ director workflow run product.ORDER '{"user": 1234, "product": 1000}'

And run it in production using the director API :

$ curl --header "Content-Type: application/json" \
  --request POST \
  --data '{"project": "product", "name": "ORDER", "payload": {"user": 1234, "product": 1000}}' \

You can also use the WebUI to execute your workflows:

Execute Workflow

Project layout

.env                # The configuration file.
workflows.yml       # The workflows definition.
tasks/      # A file containing some tasks.
    ...             # Other files containing other tasks.


  • director init [path] - Create a new project.
  • director celery [worker|beat|flower] - Start Celery daemons.
  • director webserver - Start the webserver.
  • director workflow [list|show|run] - Manage your project workflows.