excel_to_request_format

A script that converts an Excel file into the request format.

The Excel file has to be in one of the supported formats, which examples can be found in the data_formats directory.

To run the script on a supported Excel file, do:

$ python excel_to_request_format.py <Excel file path> <output file path>

This prints out the request format of the excel file into <output file path>.

To see all the possible arguments, run:

$ python excel_to_request_format.py –help

class excel_to_request_format.Converter(excel_file)[source]

The SuperClass for all Excel-to-request-format converters.

All a subclass needs to do is implement all the abstract methods and the superclass does the rest of the work.

convert()[source]

Convert the file into the request format.

Returns:

The request format

exception excel_to_request_format.FormatUnsupportedError[source]

The Excel format is not supported.

excel_to_request_format.convert(excel_file)[source]

Convert the excel file into the request format.

Parameters:

excel_file – The path to the excel file

Returns:

The request format as a Python dict

excel_to_request_format.main()[source]

The function that runs the script.

excel_to_request_format.parse_args()[source]

Parses the command-line arguments.