sqlsplit

A server for splitting sql using sqlformat


License
Apache-2.0
Install
pip install sqlsplit==0.1.0

Documentation

sqlsplit

SQL-splitting server! Uses sqlparse under the hood.

Usage

$ pip install sqlsplit
$ PROD=1 python sqlsplit

Then, say ya gots a sql file like dis:

CREATE TABLE foo (n integer);

INSERT INTO foo VALUES (1), (2), (3);

SELECT * FROM foo
WHERE n > 1;

Call it example.sql. Now, using httpie, we can test it out:

$ http -f POST http://localhost:5000/split sql=@example.sql