Skip to main content

Added Value

A Sphinx extension for embedded representations of Python object values into documentation.

Added-value allows the values of Python objects to be incorporated into documentation. This is achieved by adding new roles and directives which refer to Python objects in the code being documented, much in the same way as the standard autodoc and autosummary extensions work.

Roles

The :repr: role inserts the repr representation of a Python object inline. For example, given a Python module called values containing an global int called the_answer, you can write:

The answer to life, the Universe and everything is :repr:`values.the_answer`.

The :str: role inserts the str representation of a Python object inline. For example, given a Python module called values containing an global int called the_answer, you can write:

The answer to life, the Universe and everything is :str:`values.the_answer`.

The :format: role inserts the format representation of a Python object inline. For example, given the Python Standard Library math module containing the float called the_answer, you can write:

The value of pi to three decimal places is :format:`math.pi, .3f`.

The optional value after the comma is a format string as used by the built-in format function and documented in the Format Specification Mini-Language

Directives

The .. items-table:: directive allows a tabular representation of a Python object to be included in documentation.

For example, given a module called values which contains a list of lists called month_lengths, where each inner list contains a month name and the number of days in that month, a table can be displayed like this:

.. items-table:: values.month_lengths
   :header: Month, Length
   :stub-columns: 1

This adds a one-row header, and highlights the first ‘stub’ column (the month names).

Metadata

Release files for added-value 0.5

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.5
File Size Uploaded
added-value-0.5.tar.gz 6.8 kB Details

Built distribution (wheel)

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

Total release size: 16.3 kB

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

Download URL added-value-0.5.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d8315826d19e75507a3e6a34ae696f54217d3a1fc2834ab585945b2b647d8b95
BLAKE2b-256 checksum
How to use checksums
2fa996733132671425e14d9aeac92978c99b72061baae70f390d4f4a4eed0563
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL added_value-0.5-py2.py3-none-any.whl
Size 9.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
61066ab50c256816cb788195f7ce29f922a94bd30da134cf76b7a6cea70ba890
BLAKE2b-256 checksum
How to use checksums
33c021ee233b4b8f4e5f19aafb9898d561ec771b876fa8bb8dc6dd57f6b72bae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.24.0

2 release files

0.23.0

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

This release

0.5 This release

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