Install & Compatibility
Where this runs
tested against v5.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.360s · 56.6MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 7.9s · import 0.334s · 59MB
58MB installed
● package 58MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
import_module
✓ from mozilla_taskgraph import import_module
✗ from mozilla_taskgraph.project_config import MozillaProjectConfigBuilder
register
✓ from mozilla_taskgraph import register
schema
✓ from mozilla_taskgraph import schema
This quickstart demonstrates a utility function from `mozilla-taskgraph.util`, accesses a Mozilla-specific parameter definition, and shows how to instantiate the `MozillaProjectConfigBuilder`. `mozilla-taskgraph` provides building blocks that integrate with `taskcluster-taskgraph`; therefore, a full runnable example often requires a `taskcluster-taskgraph` project setup. This example focuses on standalone components where possible.
from mozilla_taskgraph.util.task_names import add_platform_to_task_name
from mozilla_taskgraph.parameters import build_parameters
from mozilla_taskgraph.project_config import MozillaProjectConfigBuilder
# Demonstrating a utility function provided by mozilla-taskgraph
print("\n--- Demonstrating a utility function ---")
original_name = "build-linux"
platform_tag = "x64"
new_name = add_platform_to_task_name(original_name, platform_tag)
print(f"Original task name: '{original_name}', Platform: '{platform_tag}'")
print(f"Transformed task name: '{new_name}'")
# Accessing Mozilla-specific parameter definitions (conceptual)
print("\n--- Accessing Mozilla-specific parameter definitions ---")
# These parameters are typically consumed by other parts of the taskgraph
try:
# The exact way to access definitions might vary; this is illustrative.
print(f"Example parameter definition key: {next(iter(build_parameters.BUILD_PROPERTIES_DEFINITION.keys()))}")
except AttributeError:
print("Note: Parameter definitions are typically used internally by transforms.")
# Illustrating the main configuration builder (requires 'taskcluster-taskgraph')
print("\n--- Instantiating MozillaProjectConfigBuilder ---")
# In a real setup, 'project_dir' would point to a directory containing .taskcluster.yml
# For this quickstart, we'll instantiate it conceptually without requiring actual files.
# Note: Full functionality of the builder requires a valid taskgraph project structure.
try:
# Minimal instantiation, skipping schema validation for quickstart simplicity
builder = MozillaProjectConfigBuilder(
project_dir=".",
schema_validate=False
)
print("MozillaProjectConfigBuilder instantiated successfully.")
print("This builder extends taskgraph's ProjectConfig to include Mozilla-specific logic and defaults.")
except Exception as e:
print(f"Could not instantiate MozillaProjectConfigBuilder: {e}")
print("Ensure 'taskcluster-taskgraph' is installed and project_dir is correctly set for full functionality.")
taskgraph --version
Upgrade
Version history
5.0.1latest on PyPI · released Aug 7, 2026
Audit
Dependencies
taskcluster-taskgraphrequiredCore dependency; mozilla-taskgraph provides extensions and transforms for the taskcluster-taskgraph framework. It is specified as a direct requirement in pyproject.toml.