{"id":16892954,"url":"https://github.com/gmr/pgparse","last_synced_at":"2025-07-27T04:08:20.338Z","repository":{"id":57452186,"uuid":"196051528","full_name":"gmr/pgparse","owner":"gmr","description":"Python wrapper for libpg_query","archived":false,"fork":false,"pushed_at":"2022-08-21T12:55:16.000Z","size":114,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-16T07:08:06.981Z","etag":null,"topics":["postgresql","python3","sql"],"latest_commit_sha":null,"homepage":"https://pgparse.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gmr.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-09T17:11:07.000Z","updated_at":"2024-01-01T14:40:09.000Z","dependencies_parsed_at":"2022-08-26T08:23:24.199Z","dependency_job_id":null,"html_url":"https://github.com/gmr/pgparse","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/gmr/pgparse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmr%2Fpgparse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmr%2Fpgparse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmr%2Fpgparse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmr%2Fpgparse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gmr","download_url":"https://codeload.github.com/gmr/pgparse/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmr%2Fpgparse/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267298756,"owners_count":24065889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["postgresql","python3","sql"],"created_at":"2024-10-13T17:13:00.636Z","updated_at":"2025-07-27T04:08:20.321Z","avatar_url":"https://github.com/gmr.png","language":"Python","readme":"pgparse\n=======\n\nPython wrapper for `libpg_query \u003chttps://github.com/lfittl/libpg_query/\u003e`_\n\n|Version| |Coverage| |License| |Docs|\n\nInstallation\n------------\n\n.. code-block:: bash\n\n    pip install pgparse\n\nExample Usage\n-------------\n\nThe following example shows how to create a dump and then read it in, and\niterate through the data of one of the tables.\n\n.. code-block:: python\n\n    import pprint\n\n    import pgparse\n\n    sql = \"SELECT * FROM pg_catalog.pg_class WHERE relname = 'foo'\"\n    print('Fingerprint: {}'.format(pgparse.fingerprint(sql)))\n    print('Normalized: {!r}'.format(pgparse.normalize(sql)))\n    parsed = pgparse.parse(sql)\n    pprint.pprint(parsed)\n\n    func = \"\"\"\\\n    CREATE FUNCTION sales_tax(subtotal real) RETURNS real AS $$\n            BEGIN\n                RETURN subtotal * 0.06;\n            END;\n            $$ LANGUAGE plpgsql;\n    \"\"\"\n    parsed = pgparse.parse_pgsql(func)\n    pprint.pprint(parsed)\n\n\n.. |Version| image:: https://img.shields.io/pypi/v/pgparse.svg?\n   :target: https://pypi.python.org/pypi/pgparse\n   :alt: Package Version\n\n.. |Coverage| image:: https://codecov.io/gh/gmr/pgparse/branch/main/graph/badge.svg\n   :target: https://codecov.io/github/gmr/pgparse?branch=main\n   :alt: Code Coverage\n\n.. |License| image:: https://img.shields.io/pypi/l/pgparse.svg?\n   :target: https://github.com/gmr/pgparse/blob/main/LICENSE\n   :alt: BSD\n\n.. |Docs| image:: https://img.shields.io/readthedocs/pgparse.svg?\n   :target: https://pgparse.readthedocs.io/\n   :alt: Documentation Status\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmr%2Fpgparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmr%2Fpgparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmr%2Fpgparse/lists"}