renderers

Tools for formatting data as text

class html_table(data, header_row=None)[source]

Example

>>> str(html_table([[1,2], [3,4]], header_row=['col_1', 'col_2']))
'<table><tr><th>col_1</th><th>col_2</th></tr><tr><td>1</td><td>2</td></tr><tr><td>3</td><td>4</td></tr></table>'
as_elem()[source]

Representation as xml.etree.ElementTree.Element

class xml_renderer(data)[source]

ABC for XML renderers

These contain methods for rendering data to xml.etree.ElementTree.Element or str

as_elem()[source]

Representation as xml.etree.ElementTree.Element