def pretty_print()

in _tools/createdatadocs.py [0:0]


def pretty_print(data, filename=None):
    if filename is None:
        logging.debug(json.dumps(data, sort_keys=True, indent=4))
    else:
        with open(filename, 'w') as outfile:
            json.dump(data, outfile, sort_keys=True, indent=4)