Skip to main content

taskferry-jobs

Batch job backends for Taskferry: AWS Batch, Kubernetes and Azure Container Apps Jobs.

flowchart TD
    JS["JobSpec<br/>image · argv · resources · timeout"]
    TP["Taskferry router"]

    JS --> TP

    TP -->|"profile=gpu"| K8S["Kubernetes"]
    TP -->|"profile=batch"| AWS["AWS Batch"]
    TP -->|"profile=azure"| ACA["Container Apps"]
pip install 'taskferry-jobs[aws]'
pip install 'taskferry-jobs[kubernetes]'
pip install 'taskferry-jobs[azure]'

Every SDK is imported lazily inside the backend that needs it, so import taskferry_jobs pulls in none of them.

Use

from taskferry import Resources, Taskferry

runtime = Taskferry.from_mapping(
    {
        "backends": {
            "gpu": {"factory": "kubernetes", "namespace": "batch"},
            "batch": {"factory": "aws-batch", "job_queue": "q", "job_definition": "d"},
        },
        "routes": [
            {"kind": "job", "profile": "gpu", "backend": "gpu"},
            {"kind": "job", "profile": "batch", "backend": "batch"},
        ],
    }
)

handle = runtime.jobs.submit(
    "train-model",
    image="pytorch:2.4-cuda",
    profile="gpu",
    resources=Resources(cpu="8", memory="32Gi", gpu=2),
    timeout=7200,
)

Capabilities

AWS Batch Kubernetes Container Apps (Cloud Run) (subprocess)
CPU / MEMORY yes yes yes no no
GPU yes yes no no no
PARALLELISM yes yes yes yes no
TIMEOUT yes yes yes yes yes
RESULT yes no no no yes

The "no"s are the point, and they are asserted in the test suite rather than only documented. A spec asking for a GPU on Container Apps raises UnsupportedCapability at submit time instead of running on a CPU and returning results nobody can explain three days later.

Resource translation

Resources uses Kubernetes quantity syntax ("1000m", "512Mi") because it is unambiguous about units and every runtime can convert from it:

Resources Kubernetes AWS Batch Container Apps
cpu="2000m" 2000m VCPU: 2 cpu: 2.0
memory="16Gi" 16Gi MEMORY: 16384 memory: 16Gi
gpu=2 nvidia.com/gpu: 2 GPU: 2 rejected

Testing

Every client is injectable, so the whole suite runs with no cloud account and no cluster:

KubernetesJobBackend(api=FakeBatchV1Api())
BatchJobBackend(client=FakeBatchClient(), job_queue="q", job_definition="d")

License

Apache-2.0.

Release files for taskferry-jobs 0.2.0

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

Source distribution (sdist)

Source distribution for taskferry-jobs 0.2.0
File Size Uploaded
taskferry_jobs-0.2.0.tar.gz 16.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for taskferry-jobs 0.2.0
File Interpreter ABI Platform
taskferry_jobs-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 38.2 kB

Release files / taskferry_jobs-0.2.0.tar.gz

Download URL taskferry_jobs-0.2.0.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6f0d9a7069b4bfbcc44e6e1bef091e0bb01c24c16a710ff6e7eb1d57ae015952
BLAKE2b-256 checksum
How to use checksums
8ed37f4ef78e90d3c4b8b4a2017ffde3299f6ae864854cf564cbbf14dd437527
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 18, 2026.

Transparency log

Release files / taskferry_jobs-0.2.0-py3-none-any.whl

Download URL taskferry_jobs-0.2.0-py3-none-any.whl
Size 21.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e462dc2cb0c96c86d029ea65de9d4d1c515db4935762bd1af87d2b928b9d8d7
BLAKE2b-256 checksum
How to use checksums
70911c9600ef0bd9b86bb92d91c6b2e805b0b98a41001b4ca3ef4293388e04b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 18, 2026.

Transparency log

Release history Release notifications | RSS feed

0.3.0

2 release files

This release

0.2.0 This release

2 release files

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