Skip to main content

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)

Source distribution for esql-parser 9.1.3
File Size Uploaded
esql_parser-9.1.3.tar.gz 55.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for esql-parser 9.1.3
File Interpreter ABI Platform
esql_parser-9.1.3-py3-none-any.whl Python 3 none any Details

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 log

Release 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 log

Release history Release notifications | RSS feed

This release

9.1.3 This release

2 release files

9.0.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page