esql-parser
A Python package providing an ANTLR4-based parser and lexer for Elasticsearch ESQL (Event Query Language).
The grammar is derived from the official Elasticsearch repository and adapted for the Python ANTLR runtime.
Installation
pip install esql-parser
Usage
from antlr4 import InputStream, CommonTokenStream
from esql_parser.EsqlBaseLexer import EsqlBaseLexer
from esql_parser.EsqlBaseParser import EsqlBaseParser
# Example: parse a simple ESQL query
input_stream = InputStream("FROM logs | STATS count(*) BY host")
lexer = EsqlBaseLexer(input_stream)
token_stream = CommonTokenStream(lexer)
parser = EsqlBaseParser(token_stream)
tree = parser.singleStatement()
print(tree.toStringTree(recog=parser))
Versioning
The version number of esql-parser matches the corresponding Elasticsearch version from which the grammar was taken (e.g. esql-parser==9.1.3 → Elasticsearch 9.1.3).
Metadata
Release files for esql-parser 9.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| esql_parser-9.1.3.tar.gz | 55.1 kB | With provenance | Details for esql_parser-9.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| esql_parser-9.1.3-py3-none-any.whl | Python 3 | none | any | Details for esql_parser-9.1.3-py3-none-any.whl |
Total release size: 111.0 kB
Release files / esql_parser-9.1.3.tar.gz
| Download URL | esql_parser-9.1.3.tar.gz |
|---|---|
| Size | 55.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae19c5218aa1011d5faf2768628ff4a49d259db5ef75b0c006c0290c7d4fa7cf
|
|
BLAKE2b-256 checksum How to use checksums |
f22d57fcd87ee2dab15e076498555bad9e93341304577d39e7fc0b7fbb419f03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.
Transparency logRelease files / esql_parser-9.1.3-py3-none-any.whl
| Download URL | esql_parser-9.1.3-py3-none-any.whl |
|---|---|
| Size | 55.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dd0ce4975bc000d2b048a7a666664ca5b57fb4871c88246cdf5abd2ef26a741e
|
|
BLAKE2b-256 checksum How to use checksums |
7a9a8b02b047f9e83db9c8c240c38f40c574600678cfcc28a7f88fa5345b1b7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.
Transparency logSecurity for esql-parser 9.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for esql_parser-9.1.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.