Format your SQL statements using the sql-pretty-printer API
Project description
sql-format
Format your SQL statements using the sql-pretty-printer API.
Dependencies
This project uses the following modules:
Installation
To install, download the repository via:
git clone https://github.com/rrickgauer/sql-format.git
Usage
In the sql-format directory, use:
python sql-format.py
Example
sql-format will take the following SQL statement:
select Songs.id, Songs.title, Artists.name from Songs left join Artists on Songs.artist_id = Artists.id where Songs.id > 100 order by Songs.title desc limit 20;
and turns it into this:
SELECT Songs.id,
Songs.title,
Artists.name
FROM Songs
LEFT JOIN Artists
ON Songs.artist_id = Artists.id
WHERE Songs.id > 100
ORDER BY Songs.title DESC
LIMIT 20;
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sql-format-0.0.6.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for sql_format-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7da57f6ed019319176e4ffa21433dffd214e106a36274f43617493ab3df23fc4 |
|
MD5 | 091380a54a7e74a320e1968b92207974 |
|
BLAKE2b-256 | abca2cab020ddd12139c645af5957c783630b3a8691d7c13b9fd16f6e19942d8 |