Skip to main content

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, Python str.format) is replaced with an app-specific dataset for Glean apps. If used, default_dataset is 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 references experiment, 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.11.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mozilla-metric-config-parser 2026.11.2
File Size Uploaded Provenance Actions
mozilla_metric_config_parser-2026.11.2.tar.gz 81.5 kB With provenance Details for mozilla_metric_config_parser-2026.11.2.tar.gz

Release files / mozilla_metric_config_parser-2026.11.2.tar.gz

Download URL mozilla_metric_config_parser-2026.11.2.tar.gz
Size 81.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f501c5a5009ce3d13dc3b6f3195e501290aa903280b0c4f68f84ab88986ac496
BLAKE2b-256 checksum
How to use checksums
a493b0fe1d6df7b30a0e59d0aacac67cbedbc41e9ea62a5af7a1b1117bc3a53c
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 Nov 16, 2026.

Transparency log

Security for mozilla-metric-config-parser 2026.11.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.11.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 Nov 16, 2026.

Transparency log

A 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.

Release history Release notifications | RSS feed

This release

2026.11.2 This release

1 release file Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page