Skip to content

Latest commit

 

History

History
79 lines (54 loc) · 2.37 KB

README.rst

File metadata and controls

79 lines (54 loc) · 2.37 KB

pglast

PostgreSQL Languages AST and statements prettifier

Author: Lele Gaifax
Contact: [email protected]
License:GNU General Public License version 3 or later
Status: Build status Documentation status Test coverage status
Version: 6

This is a Python 3 module that exposes the parse tree of a PostgreSQL statement (extracted by the almost standard PG parser repackaged as a standalone static library by libpg_query) as set of interconnected nodes, usually called an abstract syntax tree.

See a more detailed introduction in the documentation.

Installation

As usual, the easiest way is with pip:

$ pip install pglast

Alternatively you can clone the repository:

$ git clone https://github.com/lelit/pglast.git --recursive

and install from there:

$ pip install ./pglast

Development

There is a set of makefiles implementing the most common operations, a make help will show a brief table of contents. A comprehensive test suite, based on pytest, covers nearly 99% of the source lines.

Documentation

Latest documentation is hosted by Read the Docs at https://pglast.readthedocs.io/en/v6