configconfig.autoconfig¶
A Sphinx directive for documenting YAML configuration values.
Provides the autoconfig directive to document configuration
values automatically, the conf directive to document them manually,
and the conf role to link to a conf directive.
Attention
This module has the following additional requirements:
docutils sphinx<3.4.0,>=3.0.3 sphinx-toolbox
These can be installed as follows:
python -m pip install configconfig[sphinx]
Usage¶
-
.. autoconfig::¶ Directive to automatically document an YAML configuration value.
Takes a single argument, either the fully qualified name of the
ConfigVarobject, or the name of the module if the:category:option is given.-
:category:(string)¶ (optional) The category of options to document.
-
-
.. conf::¶ Directive to document an YAML configuration value.
-
:conf:¶ Role to add a cross-reference to a
conforautoconfigdirective.
API Reference¶
Classes:
|
Sphinx directive to automatically document an YAML configuration value. |
Functions:
|
Parse the content of a |
|
Setup Sphinx Extension. |
-
class
AutoConfigDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)[source]¶ Bases:
SphinxDirectiveSphinx directive to automatically document an YAML configuration value.
Methods:
document_config_var(var_obj)Document the given configuration value.
run()Process the content of the directive.
-
parse_conf_node(env, text, node)[source]¶ Parse the content of a
confdirective.- Parameters:
env (
BuildEnvironment) – The Sphinx build environment.text (
str) – The content of the directive.node (
desc_signature) – The docutils node class.
- Return type: