metric-config-parser
This package parses configuration files that are compatible with jetstream and opmon compatible configuration files.
Installation
pip install mozilla-metric-config-parser
Templating in from_expression
A data source's from_expression supports two independent templating layers:
{dataset}(single braces, Pythonstr.format) is replaced with an app-specific dataset for Glean apps. If used,default_datasetis mandatory.{{experiment.<attr>}}(double braces, Jinja) is replaced with an attribute of the experiment the data source is being resolved for, e.g.{{experiment.normandy_slug}},{{experiment.start_date_str}},{{experiment.end_date_str}},{{experiment.last_enrollment_date_str}}. This is only rendered when the expression actually referencesexperiment, and is only available when resolving a data source for an experiment.
[data_sources.messaging_events]
from_expression = """(
SELECT *
FROM `moz-fx-data-shared-prod.fenix.events_stream`
WHERE STARTS_WITH(extras.string.message_key, '{{experiment.normandy_slug}}:')
)"""
experiments_column_type = "none"
A literal brace can still be written by doubling it, e.g. '{{d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}}'.
Testing
Pytest
pytest --ruff --ignore=metric_config_parser/tests/integration/
Linting and formatting
ruff check metric_config_parser
ruff format --check metric_config_parser
mypy metric_config_parser
Metadata
Release files for mozilla-metric-config-parser 2026.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mozilla_metric_config_parser-2026.9.1.tar.gz | 64.1 kB | Details |
Release files / mozilla_metric_config_parser-2026.9.1.tar.gz
| Download URL | mozilla_metric_config_parser-2026.9.1.tar.gz |
|---|---|
| Size | 64.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7c44fb18c3228280bd1251b03ddd89ed873f75a589b8bc772de3ed9fb27098fe
|
|
BLAKE2b-256 checksum How to use checksums |
60a3074fa922731c69620bf39145b2db8bbd339ac5c344ceb4f2f1cfb9f3290a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 8, 2026.
Transparency log