contrib.sphinx

Sphinx documentation plugin used to document tasks.

Introduction

Usage

Add the extension to your docs/conf.py configuration module:

extensions = (...,
              'celery.contrib.sphinx')

If you’d like to change the prefix for tasks in reference documentation then you can change the celery_task_prefix configuration value:

celery_task_prefix = '(task)'  # < default

With the extension installed autodoc will automatically find task decorated objects (e.g. when using the automodule directive) and generate the correct (as well as add a (task) prefix), and you can also refer to the tasks using :task:proj.tasks.add syntax.

Use .. autotask:: to alternatively manually document a task.

Module Contents

Classes

TaskDocumenter() Document task definitions.
TaskDirective() Sphinx task directive.

Functions

autodoc_skip_member_handler(app,what,name,obj,skip,options) Handler for autodoc-skip-member event.
setup(app) Setup Sphinx extension.
class TaskDocumenter

Document task definitions.

can_document_member(member, membername, isattr, parent)
format_args()
document_members(all_members=False)
check_module()
class TaskDirective

Sphinx task directive.

get_signature_prefix(sig)
autodoc_skip_member_handler(app, what, name, obj, skip, options)

Handler for autodoc-skip-member event.

setup(app)

Setup Sphinx extension.