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]
Release files for trino-query-parser 0.422.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| trino_query_parser-0.422.7-py3-none-any.whl | Python 3 | none | any | Details |
Release files / trino_query_parser-0.422.7-py3-none-any.whl
| Download URL | trino_query_parser-0.422.7-py3-none-any.whl |
|---|---|
| Size | 149.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0bf72a5ca68290ba6fe59ad9212169e4a4742f2718662f2cd2a6e35d7598096c
|
|
BLAKE2b-256 checksum How to use checksums |
e785b105e71b69be56df0202cc65f1411e3cbac7ba4d1db982d0e2246c758188
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.4
|