{"categories":[{"label":"Monitoring","url":"https://skillfed.io/packages/category/system-monitoring/3"}],"enrichment":{"capability":"Parses Prometheus query language (PromQL) expressions into a Python-accessible abstract syntax tree that can be inspected, walked, transformed, and formatted back to PromQL.","skillfed_tags":["prometheus","query-parsing","rust-bindings"],"use_cases":["Extract metric names and label matchers from Prometheus queries for validation or analysis.","Rewrite or transform PromQL expressions programmatically (e.g., rename metrics, adjust time ranges).","Build tooling that inspects or validates Prometheus query syntax before execution.","Walk query trees to collect metadata or enforce query patterns in monitoring systems.","Parse duration strings from PromQL into Python timedelta objects."],"what_it_does":"promql-parser is a Python binding to a Rust-based PromQL parser that converts Prometheus query expressions into an inspectable AST. It lets you parse queries like `rate(http_requests_total{job=\"api\"}[5m])` into structured objects (VectorSelector, MatrixSelector, Call, AggregateExpr, BinaryExpr) that you can examine, walk depth-first, or transform into new expressions. The package also includes duration helpers to parse and format time intervals.\n\nTypical workflows involve parsing a PromQL string, inspecting its structure to extract metric names or matchers, walking the tree to collect information, or transforming nodes to rewrite queries. The AST can be converted back to PromQL string form. No runtime dependencies are required beyond Python itself.","worth_installing":"Yes, if you need to parse or manipulate PromQL queries in Python. The package is actively maintained, has no known vulnerabilities, supports Python >=3.8, and requires no runtime dependencies. Medium install friction (prebuilt wheels for common platforms) is a minor trade-off for a specialized tool with a clear use case."},"id":"promql-parser","links":{"html":"https://skillfed.io/packages/promql-parser","md":"https://skillfed.io/packages/promql-parser.md","pypi":"https://pypi.org/project/promql-parser/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-06-08","license_spdx":null,"license_treatment":"unclear","name":"promql-parser","python_support":"supports_current","summary":null},"popularity":{"monthly_downloads":430452,"position":6727,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"0.10.0"}
