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.
Release files for sphinxcontrib.datatemplates 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sphinxcontrib.datatemplates-0.9.1.tar.gz | 28.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sphinxcontrib.datatemplates-0.9.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 42.2 kB
Release files / sphinxcontrib.datatemplates-0.9.1.tar.gz
| Download URL | sphinxcontrib.datatemplates-0.9.1.tar.gz |
|---|---|
| Size | 28.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
942b606cd13aaf76b166fe4e0aa50a26820eda03ddf2d2c6c205f037efb08713
|
|
BLAKE2b-256 checksum How to use checksums |
1d1919c81d69497e95d9f25fd5f0e54467171e62d966d167ecd76a281b0db1c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
|
Release files / sphinxcontrib.datatemplates-0.9.1-py2.py3-none-any.whl
| Download URL | sphinxcontrib.datatemplates-0.9.1-py2.py3-none-any.whl |
|---|---|
| Size | 13.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
844a325316bd2318002cac53ce40a66e674b0842329b14d19b2d7162f9d04aec
|
|
BLAKE2b-256 checksum How to use checksums |
d0ac592b46966f373c82b3fe52d5c333c1fb206671adb7742b3c0b0ffc92d8ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.7.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
|