diff options
| -rw-r--r-- | CHANGELOG | 2 | ||||
| -rw-r--r-- | README.rst | 35 | ||||
| -rw-r--r-- | docs/source/index.rst | 2 | ||||
| -rw-r--r-- | docs/source/intro.rst | 2 |
4 files changed, 19 insertions, 22 deletions
@@ -109,7 +109,7 @@ Internal Changes Release 0.2.1 (Aug 13, 2016) ---------------------------- +---------------------------- Notable Changes @@ -10,32 +10,32 @@ sqlparse is a non-validating SQL parser module for Python. Install ------- -From pip, run:: +Using pip:: - $ pip install --upgrade sqlparse - -Consider using the ``--user`` option_. - -.. _option: https://pip.pypa.io/en/latest/user_guide/#user-installs + $ pip install sqlparse From the repository, run:: python setup.py install -to install python-sqlparse on your system. - -python-sqlparse is compatible with Python 2.7 and Python 3 (>= 3.3). +to install sqlparse on your system. +sqlparse is compatible with Python 2.7 and Python 3 (>= 3.4). -Run Tests ---------- -To run the test suite run:: +Quick Start +----------- - tox - -Note, you'll need tox installed, of course. +code-block:: python + >>> import sqlparse + >>> # Split a string containing two SQL statements: + >>> statements = sqlparse.split('select * from foo; select * from bar;') + >>> # Format the first statement and print it out: + >>> print(sqlparse.format(statements[0], reindent=True, keyword_case='upper')) + SELECT * + FROM foo; + >>> Links ----- @@ -46,9 +46,6 @@ Project Page Documentation https://sqlparse.readthedocs.io/en/latest/ -Discussions - https://groups.google.com/forum/#!forum/sqlparse - Issues/Bugs https://github.com/andialbrecht/sqlparse/issues @@ -56,7 +53,7 @@ Online Demo https://sqlformat.org/ -python-sqlparse is licensed under the BSD license. +sqlparse is licensed under the BSD license. Parts of the code are based on pygments written by Georg Brandl and others. pygments-Homepage: http://pygments.org/ diff --git a/docs/source/index.rst b/docs/source/index.rst index 032318a..3c5956c 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -9,7 +9,7 @@ python-sqlparse :mod:`sqlparse` is a non-validating SQL parser for Python. It provides support for parsing, splitting and formatting SQL statements. -The module is compatible with Python 2.7 and Python 3 (>= 3.3) +The module is compatible with Python 2.7 and Python 3 (>= 3.4) and released under the terms of the `New BSD license <https://opensource.org/licenses/BSD-3-Clause>`_. diff --git a/docs/source/intro.rst b/docs/source/intro.rst index 1a9913b..78cbe34 100644 --- a/docs/source/intro.rst +++ b/docs/source/intro.rst @@ -48,7 +48,7 @@ SQL statements can be beautified by using the :meth:`~sqlparse.format` function. .. code-block:: python >>> sql = 'select * from foo where id in (select id from bar);' - >>> print sqlparse.format(sql, reindent=True, keyword_case='upper') + >>> print(sqlparse.format(sql, reindent=True, keyword_case='upper')) SELECT * FROM foo WHERE id IN |
