Skip to main content

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.

Status

Build status:

CI Status Documentation Status

Installation

The added-value package is available on the Python Package Index (PyPI):

https://badge.fury.io/py/added-value.svg

The package supports Python 3 only. To install:

$ pip install added-value

Usage

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.

Powerful tools

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.

Copyright 2023 Sixty North AS

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Metadata

Release files for added-value 0.23.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for added-value 0.23.0
File Size Uploaded
added-value-0.23.0.tar.gz 28.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for added-value 0.23.0
File Interpreter ABI Platform
added_value-0.23.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 60.8 kB

Release files / added-value-0.23.0.tar.gz

Download URL added-value-0.23.0.tar.gz
Size 28.4 kB
Tags Source
SHA-256 checksum
How to use checksums
0cf5dcd65e0d643b8a0a60c22a1c532d41b62d08b0ffbe105a5da1b2fad907e2
BLAKE2b-256 checksum
How to use checksums
3576a00d24d8e0a2e6380064a3ab467757d7f426745789da30002b525cfcedd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.2

Release files / added_value-0.23.0-py2.py3-none-any.whl

Download URL added_value-0.23.0-py2.py3-none-any.whl
Size 32.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
fde49f74df64a1339df5e88b68549baeadceb35d90a658cffa3583f1f510f5b0
BLAKE2b-256 checksum
How to use checksums
94f906d7bb2f35c95e0ef0cb81785cf2b72f8739152d9ad4ab90ede3936f85ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.2

Release history Release notifications | RSS feed

0.24.0

2 release files

This release

0.23.0 This release

2 release files

0.22.2

2 release files

0.21.5

2 release files

0.20.0

2 release files

0.18.0

2 release files

0.17.0

2 release files

0.16.0

2 release files

0.14.1

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8

2 release files

0.7

2 release files

0.6

2 release files

0.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page