Install & Compatibility
Where this runs
tested against v20.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.656s · 27MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.9s · import 0.610s · 28MB
26MB installed
● package 26MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
translate
✓ from glean_parser import translate
✗ from glean_parser.util import translate
translate moved to top-level module in v5
validate_ping
✓ from glean_parser import validate_ping
lint_glean
✓ from glean_parser import lint_glean
✗ from glean_parser.lint import glinter
lint_glean is the public API; glinter is internal and removed in v19
This example runs the translator on a single metrics.yaml file, outputting Kotlin bindings.
from glean_parser import translate
# Validate and translate a metrics.yaml file to Kotlin
translate.translate(
input_filepaths=["metrics.yaml"],
output_dir="./generated",
option={"allow_reserved": False}
)
glean_parser --version
Debug
Known issues
breakingIn v19, the `coverage` subcommand was removed entirely. If you relied on it, use external coverage tools.fixRemove any calls to `glean_parser coverage ...`. Check `glean_parser --help` for available commands.
affects: >=19.0.0
deprecatedThe `--option` flag for `translate` is being replaced by structured arguments. In future versions, `options` dict will be the only way.fixPass options as a dict: `translate(..., option={"allow_reserved": False})` instead of CLI-style `--option allow_reserved=false`. affects: >=18.0.0 <20.0.0
gotchaAlways use `allow_reserved=False` in production. Without it, reserved metric names may clash with Glean internals.fixSet `option={"allow_reserved": False}` when calling `translate`. affects: all
gotchaEvent timestamp values in server templates changed in v19.0.0. Verify that your server-side ingestion expects the new format.fixUpdate server-side schema to match new timestamp handling. See PR #831.
affects: 19.0.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'glean_parser'
The package is not installed, or installed in a different environment.
fixRun `pip install glean-parser`. Verify the environment with `python -m pip list | grep glean-parser`.
ImportError: cannot import name 'translate' from 'glean_parser.util'
The import path changed in v5. The function is now at `glean_parser.translate`.
fixUse `from glean_parser import translate` instead.
glean_parser.cli.main: error: unrecognized arguments: --coverage
The `coverage` subcommand was removed in v19.
fixRemove `coverage` usage. Use external testing coverage tools if needed.
glean_parser.lint.LinterError: metric 'my.metric' is reserved
The metric name conflicts with a reserved Glean identifier.
fixUse `option={"allow_reserved": False}` to avoid this, or rename the metric. If intentional, pass `allow_reserved=True` (not recommended). Upgrade
Version history
20.0.1latest on PyPI · released Jun 11, 2026
Audit
Dependencies
No dependency data recorded yet.