A Sphinx extension for embedding Python object values into documentation as text, lists or tables.
This is achieved by adding new roles and directives which refer to Python objects which contain the values to be represented. The extension provides roles for embedded single and lists of values, and a sophisticated directive for rendering complex data structures like lists of dictionaries as tables.
Build status:
The added-value
package is available on the Python Package Index (PyPI):
The package supports Python 3 only. To install:
$ pip install added-value
Added Value provides a number of roles and directives for embedding Python values into your
documentation. For example, sing added value we can extract the value of pi from the Python
Standard Library math
module, and embed it in a sentence, using the format
role provided
by Added Values, like this:
The ratio of the circumference to the diameter of a circle is :format:`math.pi, .3f` to three decimal places.
Which gives:
The ratio of the circumference to the diameter of a circle is 3.142 to three decimal places.
Added value is powerful, and allows lists, dictionaries, and even complex data structures such as lists of lists of dictionaries to be rendered into tables in various ways. Consult the documentation for more details.