render#
- dscat.output.render(rows, fmt=Format.table, *, max_col_width=60)[source]#
Render records in the requested format.
- Parameters:
rows (
collections.abc.Sequenceofcollections.abc.Mapping) – The records to render. Every mapping shares the same keys, which become the columns in their declared order.fmt (
dscat.output.Format, defaultFormat.table) – The output format.max_col_width (
intorNone, default60) – For thetableandmarkdownformats, collapse each cell to one line and truncate it to this many characters (Noneleaves cells untouched). Thecsv,tsv, andjsonformats always keep the full values.
- Returns:
The rendered text, without a trailing newline. Empty
rowsrenders to"[]"for JSON and to the empty string for every other format.- Return type: