sqlformat

SQL formatting utility

Install

All systems
curl cmd.cat/sqlformat.sh
Debian Debian
apt-get install sqlformat
Ubuntu
apt-get install sqlformat
Arch Arch Linux
pacman -S sqlformat
image/svg+xml Kali Linux
apt-get install sqlformat
Fedora
dnf install sqlformat
Windows (WSL2)
sudo apt-get update sudo apt-get install sqlformat
OS X
brew install sqlformat
Raspbian
apt-get install sqlformat

sqlformat

SQL formatting utility

The sqlformat command-line tool can be used to reformat SQL file according to specified options or prepare a snippet in some programming language (only Python and PHP currently supported).

python3-sqlparse

non-validating SQL parser for Python 3

Sqlparse is a library which provides support for parsing, splitting and customizable formatting of SQL statements in Python environment. This is the Python 3 version of the package.

python-sqlparse

non-validating SQL parser for Python 2

Sqlparse is a library which provides support for parsing, splitting and customizable formatting of SQL statements in Python environment. This is the Python 2 version of the package.

sqlparse