1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
3 NAMEBASE= python-json2html
7 SDESC[py310]= JSON to HTML Table Representation (3.10)
8 SDESC[v11]= JSON to HTML Table Representation (3.11)
9 HOMEPAGE= https://github.com/softvar/json2html
10 CONTACT= Python_Automaton[python@ironwolf.systems]
13 SITES[main]= PYPI/j/json2html
14 DISTFILE[1]= json2html-1.3.0.tar.gz:main
19 OPTIONS_AVAILABLE= PY310 PY311
20 OPTIONS_STANDARD= none
21 VOPTS[py310]= PY310=ON PY311=OFF
22 VOPTS[v11]= PY310=OFF PY311=ON
24 DISTNAME= json2html-1.3.0
28 [PY310].USES_ON= python:py310,sutools
30 [PY311].USES_ON= python:v11,sutools
32 [FILE:2731:descriptions/desc.single]
36 Python wrapper to convert JSON into a human readable HTML Table
39 |Latest Version| |Downloads| |Build|
44 * User friendly tablular fomat, easy to read and share.
45 * If value of the key is array of objects and all the keys are same(value
46 of the key is a dict of list), the module will club by default. Eg.
58 will create only one row combining the results. This feature can be turned
59 off by explicitly passing an argument ``clubbing = False``.
61 * Generated table can be provided some attributes explicitly. Eg. giving an
62 id, class or any ``data-*`` attribute.
68 [Click here] for the online demo.
70 List of valid arguments
71 -----------------------
73 ``json2html.convert`` - The module's convert method accepts the following
76 ===================== ================
78 --------------------- ----------------
79 `json` a valid JSON; This can either be a string in valid
80 JSON format or a python object that is either dict-like or list-like at the
82 --------------------- ----------------
83 `table_attributes` e.g. pass `id="info-table"` or
84 `class="bootstrap-class"`/`data-*` to apply these attributes to the
86 --------------------- ----------------
87 `clubbing` turn on[default]/off clubbing of list with same keys
88 of a dict / Array of objects with same key
89 --------------------- ----------------
90 `encode` turn on/off[default] encoding of result to escaped
91 html, compatible with any browser
92 --------------------- ----------------
93 `escape` turn on[default]/off escaping of html tags in text
94 nodes (prevents XSS attacks in case you pass untrusted data to json2html)
95 ===================== ================
102 $ pip install json2html
104 Or, Download [here] and run `python setup.py install` after changing
105 directory to `/json2html`
110 **Example 1:** Basic usage
112 .. code-block:: python
114 from json2html import *
117 "description": "Converts JSON to HTML tabular representation"
119 json2html.convert(json = input)
126 border="1"><tr><th>name</th><td>json2html</td></tr><tr><th>description</th><td>converts
127 JSON to HTML tabular representation</td></tr></table>
129 ============ ========================================================
131 ------------ --------------------------------------------------------
132 description Converts JSON to HTML tabular representation
136 8951a53662ae9cfd812685facdba693fc950ffc1c1fd1a8a2d3cf4c34600689c 6977 json2html-1.3.0.tar.gz