Skip to main content

taskferry-cloudtasks

Run Taskferry tasks on Google Cloud Tasks — push-based, serverless, no worker process.

sequenceDiagram
    participant App
    participant TP as Taskferry
    participant CT as Cloud Tasks
    participant SVC as your service

    App->>TP: tasks.submit("myapp:send_email", 42)
    TP->>CT: create_task(http_request)
    CT->>SVC: POST /_taskferry/execute
    SVC->>SVC: handle_request(body)

Cloud Tasks is architecturally the opposite of Procrastinate — nothing polls, no worker exists, Google pushes an HTTP request at your service. The application code does not change:

runtime.tasks.submit("myapp.tasks:send_email", 42, queue="email")

Install

pip install 'taskferry-cloudtasks[gcp]'

Configure

runtime = Taskferry.from_mapping(
    {
        "backends": {
            "push": {
                "factory": "cloudtasks",
                "project": "my-project",
                "location": "europe-west1",
                "url": "https://my-service.run.app/_taskferry/execute",
                "service_account_email": "runner@my-project.iam.gserviceaccount.com",
            }
        },
        "defaults": {"task": "push"},
    }
)

Receive

handle_request takes bytes, so it works with any framework:

# Django
from taskferry import FunctionRegistry
from taskferry_cloudtasks import handle_request

REGISTRY = FunctionRegistry(allowed_modules=["myapp"])


def taskferry_execute(request):
    handle_request(request.body, dict(request.headers), registry=REGISTRY)
    return HttpResponse(status=204)
# FastAPI
@app.post("/_taskferry/execute")
async def execute(request: Request):
    handle_request(await request.body(), dict(request.headers), registry=REGISTRY)
    return Response(status_code=204)

Authenticate the endpoint. Verify the OIDC token Cloud Tasks sends, or put the service behind IAM. Taskferry never sees your framework's request object — that is what makes it portable, and it is why this part is yours.

Be idempotent. Cloud Tasks delivery is at-least-once.

Capabilities

Capability Supported Why
SUBMIT · DELAY · RETRY yes create_task, schedule_time, queue retry config
DEDUPLICATION yes task names are unique per queue for a bounded window
STATE · RESULT no Cloud Tasks reports nothing per task after creation

A handle refuses status() here instead of returning a plausible UNKNOWN forever. Record what you need in your own database, where it is actually true.

License

Apache-2.0.

Release files for taskferry-cloudtasks 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-cloudtasks 0.2.0
File Size Uploaded
taskferry_cloudtasks-0.2.0.tar.gz 11.9 kB Details

Built distribution (wheel)

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

Total release size: 26.0 kB

Release files / taskferry_cloudtasks-0.2.0.tar.gz

Download URL taskferry_cloudtasks-0.2.0.tar.gz
Size 11.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a161d1ed14799e10a69c7960c6a3e4736417c58aab1f49e30a31d659dd37b0ab
BLAKE2b-256 checksum
How to use checksums
8cc708532735dc9f863c0a2d2c9bd8ffe3bae18deb0f040a235236e665ea13ad
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_cloudtasks-0.2.0-py3-none-any.whl

Download URL taskferry_cloudtasks-0.2.0-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d5d880ab6073d87f8fcf40567d166ac82535767ab05b5437f8d2efe1d280b557
BLAKE2b-256 checksum
How to use checksums
5f5d401b9b51703763be685e88fc4a20c1b20e609d226785bd7b4cae68457564
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