taskcluster-taskgraph
Build taskcluster taskgraphs
What it is and what it does
Taskgraph is a Python library that generates and submits task graphs to Taskcluster, a generic task execution platform. It bridges declarative YAML-based task definitions with programmatic Python transforms, allowing CI systems to scale from simple configurations to complex, large-scale pipelines. The library powers Firefox's CI, which runs over 30,000 tasks.
The workflow is straightforward: a decision task invokes taskgraph, which reads YAML task definitions, applies Python-based transforms to alter or clone tasks, optionally removes unnecessary tasks through optimization, and submits the resulting graph to Taskcluster via its API. This combination of declarative configuration and programmatic control is what enables taskgraph to handle CI systems of any complexity.
Use it for:
- Scaling CI from a single .taskcluster.yml file to a multi-thousand-task pipeline with programmatic task generation.
- Applying conditional logic and transforms to task definitions based on repository state, branch, or commit metadata.
- Optimizing task graphs by removing redundant or skipped tasks before submission to reduce CI costs.
- Managing complex Firefox-like CI systems with tens of thousands of interdependent tasks.
- Automating task cloning and parameterization across multiple platforms, architectures, or test suites.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Taskgraph generates and submits task graphs to Taskcluster CI by combining declarative YAML task definitions with Python-based transforms and optimization logic.
Yes, if you are using Taskcluster and need to manage CI beyond a single configuration file. The library is production-stable, actively maintained, has no known vulnerabilities, and is proven at scale in Firefox's CI. The copyleft license (MPL 2.0) is a consideration only if you plan to distribute modified versions. Install friction is low.
Install
taskcluster-taskgraph on PyPI
pip
pip install taskcluster-taskgraphuv
uv add taskcluster-taskgraphpoetry
poetry add taskcluster-taskgraphInstalling taskcluster-taskgraph
Before you install
Low install friction with a pure-Python wheel. Actively maintained with a recent release (16 days old) and an active repository. Requires Python 3.9 or later.
License in practice
Licensed under Mozilla Public License 2.0 (MPL 2.0), a copyleft license. You must disclose source code modifications if you distribute the package, though internal use has no restrictions.
Quickstart
pip install taskcluster-taskgraph
from taskgraph import generate
task_graph = generate.generate_graph()
Requires Python 3.9 or later. Taskgraph is designed to run as a decision task within Taskcluster; standalone use requires a Taskcluster instance and appropriate API credentials.
Verify before relying
- Whether the package can be used outside a Taskcluster environment for local task graph generation and testing.
- Performance characteristics and scalability limits for task graphs beyond Firefox's 30,000+ task scale.
- Detailed API stability guarantees across minor version releases.
Package facts
| License | not declared (copyleft) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 12 — appdirs, cookiecutter, json-e, mozilla-repo-urls, msgspec, pyyaml, redo, requests, slugid, taskcluster-urls, taskcluster, voluptuous |
| Maintenance | actively maintained — 16 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 880,789/month — #4,821 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: taskcluster_taskgraph-24.2.3-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
mozilla-taskgraphProvides Mozilla-specific transforms and…
copyleft · top 15,000 on PyPI
taskclusterA complete Python client library for…
copyleft · top 5,000 on PyPI
taskcluster-urlsGenerates standardized URLs for Taskcluster…
copyleft · top 5,000 on PyPI
taskflowTaskFlow is a library for defining and…
permissive · top 15,000 on PyPI
fuzzfetchFuzzfetch retrieves Firefox, Spidermonkey, and…
copyleft · top 15,000 on PyPI
langgraph-supervisorBuilds hierarchical multi-agent systems where a…
permissive · top 15,000 on PyPI
gcloud-rest-taskqueueAsyncio and threadsafe Python client for Google…
permissive · top 15,000 on PyPI
gcloud-aio-taskqueueAsyncio and threadsafe Python client library…
permissive · top 15,000 on PyPI
graphiti-coreGraphiti builds and queries temporal context…
permissive · top 5,000 on PyPI
shrub.pyProgrammatically generate Evergreen project…
permissive · top 5,000 on PyPI