{"library":"mozilla-taskgraph","title":"Mozilla Taskgraph","description":"mozilla-taskgraph provides Mozilla-specific transforms, utilities, and parameter definitions designed to extend and integrate with the taskcluster-taskgraph framework. It enables the configuration and automation of complex CI/CD processes within Mozilla's infrastructure. The library is actively maintained with frequent updates, currently at version 4.1.1, and follows semver principles.","language":"python","status":"active","last_verified":"Sat May 16","install":{"commands":["pip install mozilla-taskgraph"],"cli":{"name":"taskgraph","version":"usage: taskgraph [-h]"}},"imports":["from mozilla_taskgraph.project_config import MozillaProjectConfigBuilder","from mozilla_taskgraph.transforms.versions import transform_version_tasks","from mozilla_taskgraph.util.task_names import add_platform_to_task_name"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from mozilla_taskgraph.util.task_names import add_platform_to_task_name\nfrom mozilla_taskgraph.parameters import build_parameters\nfrom mozilla_taskgraph.project_config import MozillaProjectConfigBuilder\n\n# Demonstrating a utility function provided by mozilla-taskgraph\nprint(\"\\n--- Demonstrating a utility function ---\")\noriginal_name = \"build-linux\"\nplatform_tag = \"x64\"\nnew_name = add_platform_to_task_name(original_name, platform_tag)\nprint(f\"Original task name: '{original_name}', Platform: '{platform_tag}'\")\nprint(f\"Transformed task name: '{new_name}'\")\n\n# Accessing Mozilla-specific parameter definitions (conceptual)\nprint(\"\\n--- Accessing Mozilla-specific parameter definitions ---\")\n# These parameters are typically consumed by other parts of the taskgraph\ntry:\n    # The exact way to access definitions might vary; this is illustrative.\n    print(f\"Example parameter definition key: {next(iter(build_parameters.BUILD_PROPERTIES_DEFINITION.keys()))}\")\nexcept AttributeError:\n    print(\"Note: Parameter definitions are typically used internally by transforms.\")\n\n# Illustrating the main configuration builder (requires 'taskcluster-taskgraph')\nprint(\"\\n--- Instantiating MozillaProjectConfigBuilder ---\")\n# In a real setup, 'project_dir' would point to a directory containing .taskcluster.yml\n# For this quickstart, we'll instantiate it conceptually without requiring actual files.\n# Note: Full functionality of the builder requires a valid taskgraph project structure.\ntry:\n    # Minimal instantiation, skipping schema validation for quickstart simplicity\n    builder = MozillaProjectConfigBuilder(\n        project_dir=\".\", \n        schema_validate=False\n    )\n    print(\"MozillaProjectConfigBuilder instantiated successfully.\")\n    print(\"This builder extends taskgraph's ProjectConfig to include Mozilla-specific logic and defaults.\")\nexcept Exception as e:\n    print(f\"Could not instantiate MozillaProjectConfigBuilder: {e}\")\n    print(\"Ensure 'taskcluster-taskgraph' is installed and project_dir is correctly set for full functionality.\")\n","lang":"python","description":"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.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-16","installed_version":"4.1.2","pypi_latest":"4.1.2","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":7.6,"avg_import_s":null,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"mozilla-taskgraph","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"56.3M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"mozilla-taskgraph","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":8.5,"import_time_s":null,"mem_mb":null,"disk_size":"59M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"mozilla-taskgraph","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"61.9M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"mozilla-taskgraph","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":7.6,"import_time_s":null,"mem_mb":null,"disk_size":"65M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"mozilla-taskgraph","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"53.2M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"mozilla-taskgraph","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":6,"import_time_s":null,"mem_mb":null,"disk_size":"56M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"mozilla-taskgraph","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"52.6M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"mozilla-taskgraph","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":6.2,"import_time_s":null,"mem_mb":null,"disk_size":"56M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"mozilla-taskgraph","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":"57.7M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"mozilla-taskgraph","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"broken","install_time_s":9.7,"import_time_s":null,"mem_mb":null,"disk_size":"61M"}]}}