Metadata-Version: 2.4
Name: pglast
Version: 7.11
Summary: PostgreSQL Languages AST and statements prettifier
Author-email: Lele Gaifax <lele@metapensiero.it>
Project-URL: Changelog, https://github.com/lelit/pglast/blob/v7/CHANGES.rst
Project-URL: Source, https://github.com/lelit/pglast
Keywords: postgresql,parser,sql,prettifier
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: SQL
Classifier: Topic :: Database
Classifier: Topic :: Utilities
Description-Content-Type: text/x-rst
Provides-Extra: dev
Requires-Dist: bump-my-version==1.2.5; extra == "dev"
Requires-Dist: cython==3.2.3; extra == "dev"
Requires-Dist: pycparser==2.23; extra == "dev"
Requires-Dist: readme-renderer==44.0; extra == "dev"
Requires-Dist: setuptools==80.9.0; extra == "dev"
Requires-Dist: sphinx==9.0.4; extra == "dev"
Requires-Dist: twine==6.2.0; extra == "dev"
Provides-Extra: test
Requires-Dist: coverage==7.13.0; extra == "test"
Requires-Dist: pytest-cov==7.0.0; extra == "test"
Requires-Dist: pytest==9.0.2; extra == "test"

.. -*- coding: utf-8 -*-
.. :Project:   pglast — PostgreSQL Languages AST
.. :Created:   mer 02 ago 2017 14:49:24 CEST
.. :Author:    Lele Gaifax <lele@metapensiero.it>
.. :License:   GNU General Public License version 3 or later
.. :Copyright: © 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Lele Gaifax
..

========
 pglast
========

PostgreSQL Languages AST and statements prettifier
==================================================

:Author: Lele Gaifax
:Contact: lele@metapensiero.it
:License: `GNU General Public License version 3 or later`__
:Status: |build| |doc| |codecov|
:Version: `7`__

__ https://www.gnu.org/licenses/gpl.html
__ https://pglast.readthedocs.io/en/v7/development.html#history

.. |build| image:: https://github.com/lelit/pglast/actions/workflows/ci.yml/badge.svg?branch=v7
   :target: https://github.com/lelit/pglast/actions/workflows/ci.yml
   :alt: Build status
.. |doc| image:: https://readthedocs.org/projects/pglast/badge/?version=v7
   :target: https://readthedocs.org/projects/pglast/builds/
   :alt: Documentation status
.. |codecov| image:: https://codecov.io/gh/lelit/pglast/branch/v3/graph/badge.svg?token=A90D8tWnft
   :target: https://codecov.io/gh/lelit/pglast
   :alt: Test coverage status

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*.

__ https://www.postgresql.org/
__ https://github.com/pganalyze/libpg_query

See a `more detailed introduction`__ in the documentation_.

__ https://pglast.readthedocs.io/en/v7/introduction.html


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.

__ https://docs.pytest.org/en/latest/
__ https://codecov.io/gh/lelit/pglast/branch/v7/


Documentation
-------------

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

__ https://readthedocs.org/
