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.10.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mozilla_metric_config_parser-2026.10.2.tar.gz | 78.4 kB | With provenance | Details for mozilla_metric_config_parser-2026.10.2.tar.gz |
Release files / mozilla_metric_config_parser-2026.10.2.tar.gz
| Download URL | mozilla_metric_config_parser-2026.10.2.tar.gz |
|---|---|
| Size | 78.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a134f32ee41b08aaa2717417fe7ac53a977e9c7153ecbea58cef3ea97030866
|
|
BLAKE2b-256 checksum How to use checksums |
2b6932978bb73f620fbe63d4b6a83accdc7ce35d2d4324d467f6ce9aaea4af47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 26, 2026.
Transparency logSecurity for mozilla-metric-config-parser 2026.10.2
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.
Full provenance
1 file in this release has been uploaded with provenance metadata.
Attestation for mozilla_metric_config_parser-2026.10.2.tar.gz
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 Oct 26, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.