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

# `celery.app.annotations`

Task Annotations.

Annotations is a nice term for monkey-patching task classes in the configuration.

This prepares and performs the annotations in the `task_annotations` setting.

class celery.app.annotations.MapAnnotation

  Annotation map: task_name => attributes.

  annotate(task)
  annotate_any()

celery.app.annotations.prepare(annotations)

  Expand the `task_annotations` setting.

celery.app.annotations.resolve_all(anno, task)

  Resolve all pending annotations.