Skip to main content

taskferry-sqs

Run Taskferry tasks on AWS SQS — pull-based delivery, consumed by a Lambda, an ECS service, or your own loop.

flowchart LR
    APP["Application"] --> TP["Taskferry"] --> AD["taskferry-sqs"] --> Q["SQS queue"] --> C["Lambda · ECS · Fargate"]
pip install 'taskferry-sqs[aws]'

Sending

runtime = Taskferry.from_mapping(
    {
        "backends": {
            "sqs": {
                "factory": "sqs",
                "queue_url": "https://sqs.eu-west-1.amazonaws.com/123456789/tasks",
            }
        },
        "defaults": {"task": "sqs"},
    }
)

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

Consuming

AWS Lambda, with partial batch responses enabled:

from taskferry import FunctionRegistry
from taskferry_sqs import process_event

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


def handler(event, context):
    return process_event(event, registry=REGISTRY)

ECS / Fargate / a plain process:

import boto3
from taskferry_sqs import poll_forever

poll_forever(boto3.client("sqs"), QUEUE_URL, registry=REGISTRY)

poll_forever long-polls, deletes on success, leaves failures for SQS's own redrive policy, and stops cleanly on SIGTERM. It is forty lines and deliberately not a worker framework — SQS already solves visibility timeouts and dead-lettering.

Capabilities

Capability Standard queue FIFO queue Why
SUBMIT yes yes send_message
DELAY yes no FIFO delay is queue-level, not per message
DEDUPLICATION no yes MessageDeduplicationId
RETRY yes yes the queue's redrive policy
STATE · RESULT · CANCEL no no SQS cannot look up or revoke one message

The capability set is computed per queue, because a .fifo queue genuinely differs from a standard one and one class serving both must say which it is.

Two limits are enforced rather than clamped:

  • 900 seconds of delay, maximum. A longer delay raises with the limit named, instead of arriving 15 minutes from now when you asked for tomorrow.
  • FIFO queues refuse per-message delay rather than dropping it silently.

Testing

The client is injectable, so the suite runs with no AWS account:

SQSTaskBackend(queue_url="https://sqs.eu-west-1.amazonaws.com/1/q", client=FakeSQS())

License

Apache-2.0.

Release files for taskferry-sqs 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-sqs 0.2.0
File Size Uploaded
taskferry_sqs-0.2.0.tar.gz 12.0 kB Details

Built distribution (wheel)

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

Total release size: 26.1 kB

Release files / taskferry_sqs-0.2.0.tar.gz

Download URL taskferry_sqs-0.2.0.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7f4180f3d2cd41c8462b5692bc5cf7d8231ac8585dd9ca4968760261d8f6962c
BLAKE2b-256 checksum
How to use checksums
c0b9f8f58ef1bd0ef5e77e04e842dc908d3778188f9aa3fe6da1c122e169160c
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_sqs-0.2.0-py3-none-any.whl

Download URL taskferry_sqs-0.2.0-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e15f3d10ac6fc4451046a2a5d9a134cda15e303a722a416dfc96af77b8008910
BLAKE2b-256 checksum
How to use checksums
33b32c53f9e9b5bf12ee1cbadf6533195e3c2afbbe2f58c45f2ea6ba27440298
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