Skip to main content

sphinxcontrib-datatemplates

This package contains sphinxcontrb.datatemplates, an extension for Sphinx to render parts of reStructuredText pages from data files in formats like JSON, YAML, and CSV.

Sample YAML Input

---
key1: value1
key2:
  - list item 1
  - list item 2
  - list item 3
nested-list:
  - ['a', 'b', 'c']
  - ['A', 'B', 'C']
mapping-series:
  - cola: a
    colb: b
    colc: c
  - cola: A
    colb: B
    colc: C

Sample Template

.. -*- mode: rst -*-

Individual Item
~~~~~~~~~~~~~~~

{{ data['key1'] }}

List of Items
~~~~~~~~~~~~~

{% for item in data['key2'] %}
- {{item}}
{% endfor %}

Nested List Table
~~~~~~~~~~~~~~~~~

Rendering a table from a list of nested sequences using hard-coded
headers.

{{ make_list_table(
    ['One', 'Two', 'Three'],
    data['nested-list'],
    title='Table from nested lists',
    ) }}

Mapping Series Table
~~~~~~~~~~~~~~~~~~~~

Rendering a table from a list of nested dictionaries using dynamic
headers.

{{ make_list_table_from_mappings(
    [('One', 'cola'), ('Two', 'colb'), ('Three', 'colc')],
    data['mapping-series'],
    title='Table from series of mappings',
    ) }}

Rendered Output

See the sphinx output online.

Metadata

Release files for sphinxcontrib.datatemplates 0.7.2

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

Source distribution (sdist)

Source distribution for sphinxcontrib.datatemplates 0.7.2
File Size Uploaded
sphinxcontrib.datatemplates-0.7.2.tar.gz 26.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinxcontrib.datatemplates 0.7.2
File Interpreter ABI Platform
sphinxcontrib.datatemplates-0.7.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 39.5 kB

Release files / sphinxcontrib.datatemplates-0.7.2.tar.gz

Download URL sphinxcontrib.datatemplates-0.7.2.tar.gz
Size 26.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6122ca992594286c15d712b635b5d0d440442934e1058dd83e3fd1910ff934c1
BLAKE2b-256 checksum
How to use checksums
2a8134dbab9d10502bb831f3ff84de1c34fbb1b57bc0181fd0a5b6fddf184c5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6

Release files / sphinxcontrib.datatemplates-0.7.2-py2.py3-none-any.whl

Download URL sphinxcontrib.datatemplates-0.7.2-py2.py3-none-any.whl
Size 13.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f9c84b647ef6fe7c2f6bb2744287c723bc155ae8f335d62a637c5d6c49ce89c4
BLAKE2b-256 checksum
How to use checksums
06a49efa798814c8413f0c431af2cabfe1b0448346cd19bc82c011b9ebe97f4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.54.0 CPython/3.8.6

Release history Release notifications | RSS feed

0.11.0

2 release files

0.10.2

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

This release

0.7.2 This release

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.1

2 release files

0.6.0

1 release file

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.0

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