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.7

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.7
File Size Uploaded Provenance Actions
added-value-0.7.tar.gz 7.5 kB Without provenance Details for added-value-0.7.tar.gz

Built distribution (wheel)

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

Total release size: 19.3 kB

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

Download URL added-value-0.7.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
205aa8550fa85a4c68a31ee4eae5722ca97373b780e3a0a9017ac3ba069b4daf
BLAKE2b-256 checksum
How to use checksums
71ffac711eed3e60d2cb7989027a310f549a51f8c71d7317caffcf5d11621905
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

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

Download URL added_value-0.7-py2.py3-none-any.whl
Size 11.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
31f05a2f706ddd503e2dd36c9865c3d606a81e061ac1139ce9c41d813b167f80
BLAKE2b-256 checksum
How to use checksums
6f0bb5ab7c29900a87052436ab6a0480b12ff3f8e8133754789add310fd3c421
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for added-value 0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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