validations_libs.cli.common module

class validations_libs.cli.common.Spinner(delay=None)[source]

Bases: object

Animated spinner to indicate activity during processing

busy = False
delay = 0.1
spinner_task()[source]
static spinning_cursor()[source]
class validations_libs.cli.common.ValidationHelpFormatter(prog, indent_increment=2, max_help_position=24, width=None)[source]

Bases: ArgumentDefaultsHelpFormatter, SmartHelpFormatter

Composite CLI help formatter, providing both default argument values, and correct new line treatment.

validations_libs.cli.common.print_dict(data)[source]

Print table from python dict with PrettyTable

validations_libs.cli.common.read_cli_data_file(data_file)[source]

Read CLI data (YAML/JSON) file. :param data_file: Path to the requested file. :type data_file: path like

Returns:

Parsed YAML/JSON file

Return type:

dict

Raises:

RuntimeError if the file doesn’t exist or is malformed.

validations_libs.cli.common.write_junitxml(output_junitxml, results)[source]

Write output file as JUnitXML format

validations_libs.cli.common.write_output(output_log, results)[source]

Write output log file as Json format