Skip to content
A non-validating SQL parser module for Python
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Update documentation to decrease chance of misunderstandings Mar 14, 2019
examples Update copyright header (fixes #372). Jul 31, 2018
sqlparse Added HQL Keywords Mar 12, 2019
tests Avoid formatting of psql commands (fixes #469). Mar 11, 2019
.editorconfig Update editorconfig Dec 23, 2016
AUTHORS Update changelog. Mar 12, 2019
CHANGELOG Update changelog. Mar 12, 2019
LICENSE Update manifest files Dec 23, 2016
Makefile Switch to twine, it's the modern world. Mar 11, 2019
README.rst Use https:// for URLs where available Apr 14, 2018
setup.cfg Include license file in the generated wheel package Oct 28, 2017 Add trove classifier for Python 3.7 support Aug 28, 2018


python-sqlparse - Parse SQL statements

sqlparse is a non-validating SQL parser module for Python.

buildstatus coverage


From pip, run:

$ pip install --upgrade sqlparse

Consider using the --user option.

From the repository, run:

python install

to install python-sqlparse on your system.

python-sqlparse is compatible with Python 2.7 and Python 3 (>= 3.3).

Run Tests

To run the test suite run:


Note, you'll need tox installed, of course.


Project Page
Online Demo

python-sqlparse is licensed under the BSD license.

Parts of the code are based on pygments written by Georg Brandl and others. pygments-Homepage:

You can’t perform that action at this time.