Registry / workflow / taskcluster

taskcluster

JSON →
library107.0.0pypypi✓ verified 22d ago

The `taskcluster` library is a comprehensive Python client for interacting with the Taskcluster API. It provides both synchronous and asynchronous interfaces for all Taskcluster API methods, allowing users to define, schedule, and manage tasks within the Taskcluster continuous integration and continuous delivery (CI/CD) system. Currently at version 99.0.3, the library maintains a rapid release cadence, with its version numbers co-versioned with the main Taskcluster platform.

pip install taskcluster
INSTALL
IMPORT
SIG · TASKCLUSTER
T
taskcluster
workflowpythonv107.0.0
Install
4.9s avg
Import
436ms
Disk
32MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v107.0.0 · 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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.446s · 32.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 4.9s · import 0.426s · 35MB
32MB installed
● package 32MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

taskcluster
import taskcluster
taskcluster.aio
import taskcluster.aio
For asynchronous API clients.
Queue
from taskcluster import Queue
from taskcluster.client import Queue
Client classes like `Queue`, `Auth`, `Index` are directly under `taskcluster` (sync) or `taskcluster.aio` (async) namespaces. The `taskcluster.client` module is not the intended public interface.

This quickstart demonstrates how to initialize a synchronous Taskcluster client, typically configured via environment variables. It attempts to fetch the status of the Taskcluster Queue service as a basic connectivity test. It also shows how to import the asynchronous client module. For authentication, `TASKCLUSTER_ROOT_URL`, `TASKCLUSTER_CLIENT_ID`, and `TASKCLUSTER_ACCESS_TOKEN` environment variables are commonly used.

import os import taskcluster # Configure client using environment variables (recommended) options = taskcluster.optionsFromEnvironment() # Alternatively, explicit configuration # options = { # 'rootUrl': 'https://taskcluster.example.com', # 'credentials': { # 'clientId': os.environ.get('TASKCLUSTER_CLIENT_ID', 'your-client-id'), # 'accessToken': os.environ.get('TASKCLUSTER_ACCESS_TOKEN', 'your-access-token') # } # } # Create a synchronous client for the Queue service queue = taskcluster.Queue(options) # Example: List tasks (requires appropriate scopes and a running Taskcluster instance) try: # This is a simplified example; actual API calls vary. # For a real listing, you'd likely use `listTasks` with filters. # We'll just try to get a service status as a quick test. status = queue.status() print(f"Taskcluster Queue Service Status: {status['state']}") except Exception as e: print(f"Could not connect to Taskcluster or fetch status: {e}") print("Ensure TASKCLUSTER_ROOT_URL and credentials are set if required.") # For asynchronous operations, use the aio client: # import asyncio # async def main(): # aio_queue = taskcluster.aio.Queue(options) # status = await aio_queue.status() # print(f"Async Queue Service Status: {status['state']}") # asyncio.run(main())
Debug
Known issues
breakingThe Docker image tags for `taskcluster/websocktunnel` now require a `v` prefix (e.g., `v99.0.0` instead of `99.0.0`).
fix
If your configurations reference `websocktunnel` Docker images by tag, update them to use the `v`-prefixed format (e.g., `image: taskcluster/websocktunnel:v99.0.0`).
affects: >=99.0.0
breakingGeneric Worker now correctly evaluates absolute paths specified in `mounts` (properties `directory` and `file`) and `artifacts` (property `path`) within task payloads. Previously, these were treated as relative paths.
fix
Review task payloads that use absolute paths in `mounts` or `artifacts` for Generic Worker. Ensure paths are specified with the expectation that they will be treated as absolute, as the previous behavior of stripping leading path separators is no longer in effect.
affects: >=98.0.0
breakingThe Generic Worker configuration properties `deploymentId` and `checkForNewDeploymentEverySecs` are no longer supported and must be removed from configurations. Additionally, Generic Worker exit code 70 now signifies 'Worker Manager advised termination' instead of 'non-current deployment ID'.
fix
Remove `deploymentId` and `checkForNewDeploymentEverySecs` from any Generic Worker configurations. Update any scripts or monitoring systems that rely on Generic Worker's exit code 70 to reflect its new meaning.
affects: >=98.0.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'taskcluster'
The `taskcluster` Python package has not been installed in the current Python environment.
fix
pip install taskcluster
ImportError: cannot import name 'client' from 'taskcluster'
The main client class in the `taskcluster` library is `Taskcluster` (uppercase 'T'), not a lowercase 'client' object.
fix
from taskcluster import Taskcluster
taskcluster.exceptions.TaskclusterAuthError: No credentials provided via environment variables (TASKCLUSTER_ROOT_URL, TASKCLUSTER_CLIENT_ID, TASKCLUSTER_ACCESS_TOKEN) or explicit arguments.
The Taskcluster client could not find the necessary authentication credentials (root URL, client ID, access token) in environment variables or explicitly provided during initialization.
fix
Set the required environment variables (e.g., `export TASKCLUSTER_ROOT_URL="https://taskcluster.net"`, `export TASKCLUSTER_CLIENT_ID="..."`, `export TASKCLUSTER_ACCESS_TOKEN="..."`) or pass them directly when initializing the client: `tc = Taskcluster(rootUrl="...", clientId="...", accessToken="...")`.
AttributeError: 'Taskcluster' object has no attribute 'createTask'
The `createTask` method is part of the `queue` namespace within the Taskcluster API, not a top-level method directly on the `Taskcluster` client object.
fix
Access the method through its correct namespace, for example: `tc.queue.createTask(...)`.
Upgrade
Version history
107.0.0latest on PyPI · released Aug 25, 2026
Audit
Dependencies
pythonrequiredRequires Python 3.9 or newer.
Agent activity
23 hits · last 30 days
node
20
OpenAI (training)
1
Resources
taskcluster — pip install taskcluster · libregistry