A Simple SQL Formatter. Builded to to a better read.
Install this with pip using this command: pip install simple-sql-formatter
In a python file import the module like this: import formatter.formatter as fm
Use format_string()
function from this module to format queries and be happy.
import formatter.formatter as fm
print(fm.format_string('select campo1, campo2, campo3 from tabela'))
The output like this:
SELECT
campo1
, campo2
, campo3
FROM tabela
Create a configuration for choose the layout of queries.