$npx skillfedfor your agent

hogql-parser

HogQL parser for internal PostHog use

With conditionsPyPI Text ProcessingReleased Jul 20262.1M downloads / moMITPlatform wheel

Decision gist · record as of 2026-08-14

platform wheels — hogql_parser-1.3.83-cp310-cp310-macosx_14_0_arm64.whl · hogql_parser-1.3.83-cp310-cp310-macosx_15_0_x86_64.whl · hogql_parser-1.3.83-cp310-cp310-manylinux_2_28_aarch64.whl
v1.3.83 · released 2026-07-30 · Python >=3.10

Yes, if you are building on PostHog or need to parse HogQL syntax on macOS or Linux. The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and ranks in the top 5000 PyPI packages by downloads. Install friction is moderate due to platform and architecture constraints—Windows users cannot use it. Verify that the Python API matches your needs before committing.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires macOS or Linux; Windows is not supported.
  • Python 3.10 or later required.
  • Medium install friction due to platform-specific prebuilt wheels; requires macOS or Linux with x86_64 or arm64 architecture.

License · maintenance · safety

MIT (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

last release 2026-07-30 (15 days) · last repo commit 2026-08-14 · 37,684 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,137,173 downloads/mo, #3,263 on PyPI

Verify before relying

pip install hogql_parser

from hogql_parser import parse_expr

ast = parse_expr('1 + 2')
print(ast)
  • Exact API surface and return types for Python parse functions (description shows npm API but Python equivalents not detailed)
  • Whether parse functions return JSON strings or native Python objects in the Python package
  • Error handling behavior in Python (whether errors are raised or returned as objects like the npm version)
Same gist for agents: .md · .json

What it is and what it does

HogQL Parser is a native C++ extension for Python that parses HogQL query expressions, SELECT statements, and Hog programs into abstract syntax trees. It wraps an ANTLR4-based parser shared with a WebAssembly version for JavaScript. The package is designed for internal PostHog use and supports Python 3.10 through 3.13 on macOS and Linux platforms.

The parser accepts HogQL syntax—a SQL-like query language—and produces structured ASTs that can be consumed by downstream tools. It has no runtime dependencies and installs via prebuilt wheels for supported architectures, though Windows is not supported. The package is actively maintained and has seen recent releases.

Use it for

  • Parse HogQL expressions in PostHog analytics pipelines to validate or transform user queries
  • Build development tools or IDE plugins that need to understand HogQL syntax and structure
  • Integrate HogQL query parsing into backend services running on Linux or macOS infrastructure
  • Generate ASTs for query optimization or analysis in analytics platforms

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you are building on PostHog or need to parse HogQL syntax on macOS or Linux.

The package is actively maintained, has no known vulnerabilities, uses a permissive MIT license, and ranks in the top 5000 PyPI packages by downloads. Install friction is moderate due to platform and architecture constraints—Windows users cannot use it. Verify that the Python API matches your needs before committing.

Install

hogql-parser on PyPI

Before you install

Medium install friction due to platform-specific prebuilt wheels; requires macOS or Linux with x86_64 or arm64 architecture. Active maintenance with recent releases and no known vulnerabilities.

Requires macOS or Linux; Windows is not supported. Python 3.10 or later required.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.

Quickstart

pip install hogql_parser

from hogql_parser import parse_expr

ast = parse_expr('1 + 2')
print(ast)

Verify before relying

  • Exact API surface and return types for Python parse functions (description shows npm API but Python equivalents not detailed)
  • Whether parse functions return JSON strings or native Python objects in the Python package
  • Error handling behavior in Python (whether errors are raised or returned as objects like the npm version)

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionMedium. Platform-specific wheel
Runtime dependenciesNone
MaintenanceActively maintained 15 days since the last release
Last repo commit
First released
Downloads2,137,173 / month, #3,263 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableOperating System :: MacOSOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Evidence: hogql_parser-1.3.83-cp310-cp310-macosx_14_0_arm64.whl; hogql_parser-1.3.83-cp310-cp310-macosx_15_0_x86_64.whl; hogql_parser-1.3.83-cp310-cp310-manylinux_2_28_aarch64.whl; hogql_parser-1.3.83-cp310-cp310-manylinux_2_28_x86_64.whl; hogql_parser-1.3.83-cp311-cp311-macosx_14_0_arm64.whl; hogql_parser-1.3.83-cp311-cp311-macosx_15_0_x86_64.whl; hogql_parser-1.3.83-cp311-cp311-manylinux_2_28_aarch64.whl; hogql_parser-1.3.83-cp311-cp311-manylinux_2_28_x86_64.whl; hogql_parser-1.3.83-cp312-cp312-macosx_14_0_arm64.whl; hogql_parser-1.3.83-cp312-cp312-macosx_15_0_x86_64.whl; hogql_parser-1.3.83-cp312-cp312-manylinux_2_28_aarch64.whl; hogql_parser-1.3.83-cp312-cp312-manylinux_2_28_x86_64.whl; hogql_parser-1.3.83-cp313-cp313-macosx_14_0_arm64.whl; hogql_parser-1.3.83-cp313-cp313-macosx_15_0_x86_64.whl; hogql_parser-1.3.83-cp313-cp313-manylinux_2_28_aarch64.whl; hogql_parser-1.3.83-cp313-cp313-manylinux_2_28_x86_64.whl

Tags

Capabilities
hogql parser pythonquery expression parserast generation from sqlhog language parserposthog query parsingantlr4 based parsersql-like query parser
Topics
query-parsingposthog-ecosystemantlr4

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “hogql parser python”

  • hogql-parserParses HogQL query expressions and Hog programs into abstract syntax…
  • hogql-parser-rsParses HogQL query expressions into JSON AST format via a hand-rolled…
  • dparseParses Python dependency files (requirements.txt, conda.yml, tox.ini,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Text Processing packages

regex Worth it
PyPI · Python Modules · released Jul 2026

A drop-in replacement for Python's standard `re` module that adds advanced regex features like nested sets, fuzzy matching, lookaround in conditionals, and full Unicode case-folding while maintaining backward compatibility.

Apache-2.0 AND CNRI-Pythoncompiled wheel · 3.10+
437.7Mdownloads / mo
pyparsing Worth it
PyPI · Text Processing · released Jan 2026

pyparsing provides a library for building text parsers directly in Python code using composable grammar classes, handling quoted strings, whitespace variation, and embedded comments without regex or lex/yacc.

Install it if you need to parse text or define grammars programmatically.

MITpure Python · 3.9+
412.7Mdownloads / mo
fonttools Worth it
PyPI · Text Processing · released May 2026

fonttools manipulates font files in multiple formats (TrueType, OpenType, AFM, Type 1, Mac-specific) and includes TTX, a tool to convert fonts to and from XML text format.

Install it if you need to read, write, or manipulate fonts programmatically or via the TTX command-line tool.

permissive licensepure Python · 3.10+
235.9Mdownloads / mo
docutils With conditions
PyPI · Software Development · released May 2026

Docutils converts plaintext documentation in reStructuredText format into multiple output formats including HTML, XML, and LaTeX using a modular processing system.

BSD-3-Clausepure Python · 3.9+
225.6Mdownloads / mo
RapidFuzz Worth it
PyPI · Text Processing · released Apr 2026

RapidFuzz provides fast fuzzy string matching using Levenshtein Distance and related metrics, implemented mostly in C++ with Python bindings for rapid similarity scoring and approximate string matching.

Install it if you need fuzzy string matching; it's a solid replacement for FuzzyWuzzy with better licensing and performance.

MITcompiled wheel · 3.10+
184.2Mdownloads / mo
tinycss2 Worth it
PyPI · Text Processing · released Nov 2025

tinycss2 parses CSS strings into token and block objects, and generates CSS strings from those objects, following the CSS Syntax Level 3 specification without enforcing specific properties or values.

Install it if your project requires CSS tokenization or syntax manipulation.

BSD-3-Clausepure Python · 3.10+
113.2Mdownloads / mo

See also hogql-parser-rs · fugue-sql-antlr · tree-sitter-ruby · tree-sitter-python · openqasm3 · tree-sitter-php · tree-sitter-go · tree-sitter-java · tree-sitter-swift · tree-sitter-json