monique-tables

Parse anything into a table - JSON, CSV files, text files, command output.


Keywords
parsing table monitoring
License
BSD-3-Clause
Install
pip install monique-tables==1.2

Documentation

monique-tables

The library parses multiple input formats into a tabular representation. It guesses field delimiters, column widths and discovers a structure of JSON files to create the table.

The supported input formats are listed here: http://monique-tables.readthedocs.io/en/latest/reference.html#mqetables.parseany.parse_input.

The library is used by https://github.com/monique-dashboards/monique.

Running tests

The directory mqetables/tests/testinput contains over 400 test files. Each *.in file represents text input which must match a corresponding *.out file (which is a JSON file with rows and header keys). To run all tests, execute:

python -m mqetables.tests.parsingtester

The testing tool provides some helpers for creating new test files, like creating an *.out file automatically. Run

python -m mqetables.tests.parsingtester --help

to see all options.