Skip to main content

Provides a parser for trino queries

Project description

PyPI PyPI - Python Version

The package provides a parser for trino queries.

Install

To install the package run:

pip install trino-query-parser

Example

>>> from trino_query_parser import parse_statement
>>> parse_statement('select * from x.y')
[['SELECT', '*', 'FROM', ['X', '.', 'Y']], '<EOF>']

Details

trino-query-parser uses trino antlr4 grammar to generate python parser code.

If you care about specific version of trino, install the corresponding version of trino-query-parser.

For example, for trino-405 run:

pip install trino-query-parser~=0.405.0

If there is no such version, feel free to open an issue.

Development

To generate antlr4 parser code run:

make generate-code

To install development dependencies run:

pip install -e .[test]

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

trino_query_parser-0.422.7-py3-none-any.whl (149.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page