This document describes the current stable version of Celery (5.6). For development docs, go here.

# `celery.app.routes`

Task Routing.

Contains utilities for working with task routers, (`task_routes`).

class celery.app.routes.MapRoute(map)

  Creates a router out of a `dict`.

class celery.app.routes.Router(routes=None, queues=None, create_missing=False, app=None)

  Route tasks based on the `task_routes` setting.

  expand_destination(route)
  lookup_route(name, args=None, kwargs=None, options=None, task_type=None)
  query_router(router, task, args, kwargs, options, task_type)
  route(options, name, args=(), kwargs=None, task_type=None)

celery.app.routes.expand_router_string(router)

celery.app.routes.prepare(routes)

  Expand the `task_routes` setting.