Skip to main content

Python wrapper for libpg_query

Project description

Python wrapper for libpg_query

Package Version Build Status Code Coverage BSD Documentation Status


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.

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)

func = """\
CREATE FUNCTION sales_tax(subtotal real) RETURNS real AS $$
            RETURN subtotal * 0.06;
        $$ LANGUAGE plpgsql;
parsed = pgparse.parse_pgsql(func)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pgparse, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size pgparse-0.1.0.tar.gz (1.4 MB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page