def format(sql, **options):
    encoding = options.pop('encoding', None)
    stack = engine.FilterStack()
    options = formatter.validate_options(options)
    stack = formatter.build_filter_stack(stack, options)
    stack.postprocess.append(filters.SerializerUnicode())
    return ''.join(stack.run(sql, encoding))
Format *sql* according to *options*.
dataset/ETHPy150Open zsong/SqlBeautifier/sqlparse3/__init__.py/format