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.3.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.3.0
File Size Uploaded
taskferry_cloudtasks-0.3.0.tar.gz 13.0 kB Details

Built distribution (wheel)

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

Total release size: 28.0 kB

Release files / taskferry_cloudtasks-0.3.0.tar.gz

Download URL taskferry_cloudtasks-0.3.0.tar.gz
Size 13.0 kB
Tags Source
SHA-256 checksum
How to use checksums
77d387eebbeb224302ec6c51682d327b97d5251ea0c9dc96c67dad9ace9bbbf6
BLAKE2b-256 checksum
How to use checksums
c99afee6ae8abe5c270210c6a8d685c051afff1ec92527fbe61bdd71acd0312b
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 19, 2026.

Transparency log

Release files / taskferry_cloudtasks-0.3.0-py3-none-any.whl

Download URL taskferry_cloudtasks-0.3.0-py3-none-any.whl
Size 14.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d3074d41dbca2d938e127bbbd2f469e3f095d97fc4f87d7f5080d673376ded80
BLAKE2b-256 checksum
How to use checksums
1dd34744676479ac14ef7e2a5c4ad227ed4ad2cd8b6ae8b62e2157c714def467
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 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

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