Metadata-Version: 1.1
Name: pgparse
Version: 0.2.0
Summary: Python wrapper for libpg_query
Home-page: https://github.com/gmr/pgparse
Author: Gavin M. Roy
Author-email: gavinmroy@gmail.com
License: BSD 3-Clause License
Description: pgparse
        =======
        
        Python wrapper for `libpg_query <https://github.com/lfittl/libpg_query/>`_
        
        |Version| |Coverage| |License| |Docs|
        
        Installation
        ------------
        
        .. code-block:: bash
        
            pip install pgparse
        
        Example Usage
        -------------
        
        The following example shows how to create a dump and then read it in, and
        iterate through the data of one of the tables.
        
        .. code-block:: python
        
            import pprint
        
            import pgparse
        
            sql = "SELECT * FROM pg_catalog.pg_class WHERE relname = 'foo'"
            print('Fingerprint: {}'.format(pgparse.fingerprint(sql)))
            print('Normalized: {!r}'.format(pgparse.normalize(sql)))
            parsed = pgparse.parse(sql)
            pprint.pprint(parsed)
        
            func = """\
            CREATE FUNCTION sales_tax(subtotal real) RETURNS real AS $$
                    BEGIN
                        RETURN subtotal * 0.06;
                    END;
                    $$ LANGUAGE plpgsql;
            """
            parsed = pgparse.parse_pgsql(func)
            pprint.pprint(parsed)
        
        
        .. |Version| image:: https://img.shields.io/pypi/v/pgparse.svg?
           :target: https://pypi.python.org/pypi/pgparse
           :alt: Package Version
        
        .. |Coverage| image:: https://codecov.io/gh/gmr/pgparse/branch/main/graph/badge.svg
           :target: https://codecov.io/github/gmr/pgparse?branch=main
           :alt: Code Coverage
        
        .. |License| image:: https://img.shields.io/pypi/l/pgparse.svg?
           :target: https://github.com/gmr/pgparse/blob/main/LICENSE
           :alt: BSD
        
        .. |Docs| image:: https://img.shields.io/readthedocs/pgparse.svg?
           :target: https://pgparse.readthedocs.io/
           :alt: Documentation Status
        
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
