Skip to main content

Rust-powered task queue for Python. No broker required.

Project description

taskito

A Rust-powered task queue for Python. No broker required — just SQLite or Postgres.

PyPI version Python versions License

pip install taskito                # SQLite (default)
pip install taskito[postgres]      # with Postgres backend

Quickstart

1. Define tasks in tasks.py:

from taskito import Queue

queue = Queue(db_path="tasks.db")

@queue.task()
def add(a: int, b: int) -> int:
    return a + b

2. Start a worker:

taskito worker --app tasks:queue

3. Enqueue jobs:

from tasks import add

job = add.delay(2, 3)
print(job.result(timeout=10))  # 5

Why taskito?

Most Python task queues need a separate broker (Redis, RabbitMQ) even for single-machine workloads. taskito embeds storage, scheduling, and worker management into one pip install with no external services. An optional Postgres backend adds multi-machine workers with the same API.

The engine runs in Rust — a Tokio async scheduler, an OS-thread worker pool, and Diesel over SQLite in WAL mode. The GIL is held only during task execution; run --pool prefork for true parallelism on CPU-bound work.

Features

Grouped by what you're trying to do — each section has a one-line sample and a link to its deep-dive guide. New here? Start with Capabilities at a glance.

Reliability

Retries with exponential backoff, per-exception retry rules, soft timeouts, a dead-letter queue with replay, circuit breakers, and idempotent enqueue.

@queue.task(max_retries=5, retry_backoff=2.0, retry_on=[TimeoutError])
def fetch_url(url: str) -> str: ...

→ Reliability guide

Workflows

Compose tasks with chain, fan out with group, fan in with chord — plus task dependency graphs with cascade cancel.

chain(fetch.s(url), parse.s(), store.s()).apply()

→ Workflows guide

Concurrency

A thread pool by default (ideal for I/O-bound tasks); switch to a prefork pool of child processes for true CPU parallelism with no GIL contention.

taskito worker --pool prefork --app tasks:queue   # CPU-bound: real parallelism

→ Execution & prefork guide

Scheduling

Priorities, rate limiting, periodic (cron) tasks, delayed execution, and job expiration.

@queue.task(priority=9, rate_limit="100/m")
def notify(user_id: int) -> None: ...

→ Scheduling guide

Observability

A built-in web dashboard, an events system, HMAC-signed webhooks, Prometheus and OpenTelemetry exporters, structured logging, and worker heartbeats.

taskito dashboard --app tasks:queue   # Flower-style monitoring UI

→ Dashboard & monitoring guide

Extensibility

Pluggable serializers, per-task middleware, a fully async API, and Postgres or Redis backends for multi-machine workers.

@queue.task(middleware=[MyMiddleware()])   # per-task hooks
def handle(payload: dict) -> None: ...

→ Extensibility guide

Examples

from taskito import chain, group, chord

# Sequential pipeline — each step receives the previous result
chain(fetch.s(url), parse.s(), store.s()).apply()

# Parallel fan-out, then a callback once all complete
chord([download.s(u) for u in urls], merge.s()).apply()
@queue.task(max_retries=5, retry_backoff=2.0, rate_limit="100/m")
def fetch_url(url: str) -> str:
    return requests.get(url).text

More examples — dependencies, progress tracking, middleware, FastAPI — in the docs.

Integrations

Extra Install What you get
Flask pip install taskito[flask] Taskito(app) extension, flask taskito worker CLI
FastAPI pip install taskito[fastapi] TaskitoRouter for instant REST API over the queue
Django pip install taskito[django] Admin integration, management commands
OpenTelemetry pip install taskito[otel] Distributed tracing with span-per-task
Prometheus pip install taskito[prometheus] PrometheusMiddleware, queue depth gauges, /metrics server
Sentry pip install taskito[sentry] SentryMiddleware with auto error capture and task tags
Postgres pip install taskito[postgres] Multi-machine workers via PostgreSQL backend
Redis pip install taskito[redis] Redis storage backend

Testing

Built-in test mode — no worker needed:

def test_add():
    with queue.test_mode() as results:
        add.delay(2, 3)
        assert results[0].return_value == 5

Documentation

Read the docs → — guides, API reference, and architecture. Coming from Celery? See the Migration Guide.

Comparison

Feature taskito Celery RQ Dramatiq Huey
Broker required No Yes Yes Yes Yes
Core language Rust + Python Python Python Python Python
Priority queues Yes Yes No No Yes
Rate limiting Yes Yes No Yes No
Dead letter queue Yes No Yes No No
Task dependencies Yes No No No No
Workflows (chain/group/chord) Yes Yes No Yes No
Built-in dashboard Yes No No No No
FastAPI integration Yes No No No No
Cancel running tasks Yes Yes No No No
CPU parallelism (prefork pool) Yes Yes Yes Yes Yes
Postgres backend Yes Yes No No No
Setup pip install Broker + backend Redis Broker Redis

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

taskito-0.16.0-cp311-cp311-macosx_11_0_arm64.whl (6.9 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

taskito-0.16.0-cp311-cp311-macosx_10_12_x86_64.whl (6.7 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

taskito-0.16.0-cp310-cp310-win_amd64.whl (6.4 MB view details)

Uploaded CPython 3.10Windows x86-64

taskito-0.16.0-cp310-cp310-musllinux_1_2_x86_64.whl (7.6 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

taskito-0.16.0-cp310-cp310-musllinux_1_2_aarch64.whl (7.9 MB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ ARM64

taskito-0.16.0-cp310-cp310-manylinux_2_28_x86_64.whl (7.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

taskito-0.16.0-cp310-cp310-manylinux_2_28_aarch64.whl (7.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

taskito-0.16.0-cp310-cp310-macosx_11_0_arm64.whl (6.9 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

taskito-0.16.0-cp310-cp310-macosx_10_12_x86_64.whl (6.7 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

Details for the file taskito-0.16.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for taskito-0.16.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fa1b7a602fc5a16c699c0a2dfdddab94210605a70dbc5025557118dd90619850
MD5 effacd432786c0ad7a75581305b77949
BLAKE2b-256 727f4f5e1e4d932040f09db721ce284b036ba5d4a88954b3520a66bf6e7ba2ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for taskito-0.16.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: publish.yml on ByteVeda/taskito

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file taskito-0.16.0-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for taskito-0.16.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7e4e4f65150b9c4cbc90bf8267eb646c675b57d9d2328a2f1ea55306f74cf04d
MD5 d679902eef0e56a65fc0685bcae73f37
BLAKE2b-256 92f92cc0c4d1a9efea5d37535994152dc05f0fe1d4d1cbee90a97a580a57c244

See more details on using hashes here.

Provenance

The following attestation bundles were made for taskito-0.16.0-cp311-cp311-macosx_10_12_x86_64.whl:

Publisher: publish.yml on ByteVeda/taskito

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file taskito-0.16.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: taskito-0.16.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 6.4 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for taskito-0.16.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 82a8adbe13bbf4d2e7657f871ad92dae68f8dbef0b85c208909a6ff145e6c0ee
MD5 50629eb4055634ffb6b19e93cceb2198
BLAKE2b-256 1589001fc6545042523f8420573181976bd462f0d233f9bf53c091a8a14a2d7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for taskito-0.16.0-cp310-cp310-win_amd64.whl:

Publisher: publish.yml on ByteVeda/taskito

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file taskito-0.16.0-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for taskito-0.16.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 583c8614771c3551027bedde6fbd903d16383cf8e0dbff2de2cb51fe42ad6c02
MD5 bf31f4b45dafaa55c6e52a046829500c
BLAKE2b-256 535b4da3bff0db99cee87dc4cd0ea9f51aacc0ce7fb7b07d4ead37a1d52c3cf6

See more details on using hashes here.

Provenance

The following attestation bundles were made for taskito-0.16.0-cp310-cp310-musllinux_1_2_x86_64.whl:

Publisher: publish.yml on ByteVeda/taskito

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file taskito-0.16.0-cp310-cp310-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for taskito-0.16.0-cp310-cp310-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 35e5e4721b877f1c66dcf219a9367e92ddf5fbf2b5e40bdad271aa53da41fefa
MD5 66b497a9a1266aaca116274c530daa84
BLAKE2b-256 4147abeda03f575e34f21b78737925c2d3c4e0ccade5a8739bba112239b5164a

See more details on using hashes here.

Provenance

The following attestation bundles were made for taskito-0.16.0-cp310-cp310-musllinux_1_2_aarch64.whl:

Publisher: publish.yml on ByteVeda/taskito

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file taskito-0.16.0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for taskito-0.16.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3f987da545403f1e40ff399d59cf82e5b6feb7390ce181875b1776c4b3931c02
MD5 2b7f7e5bfd54e6d7e00a443d2516e654
BLAKE2b-256 18a0df10766217eb456038f32fe5e57d8609fefba9d0d8e5a340d6246978ec77

See more details on using hashes here.

Provenance

The following attestation bundles were made for taskito-0.16.0-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: publish.yml on ByteVeda/taskito

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file taskito-0.16.0-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for taskito-0.16.0-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 84406f87acd8c041b54863f6706b36559e6048da6d2f30cfadef858ed4002ac7
MD5 bf39691b3e66cddc532dffa9fa850b1e
BLAKE2b-256 311168d99a25a5de9bab0d01502ba993d650bbe5884c52f658cb42f4b1db9b41

See more details on using hashes here.

Provenance

The following attestation bundles were made for taskito-0.16.0-cp310-cp310-manylinux_2_28_aarch64.whl:

Publisher: publish.yml on ByteVeda/taskito

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file taskito-0.16.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for taskito-0.16.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c2f38f489e63862dc9bfa900b0d216d0aac1b66656730f3643041971c38bbd64
MD5 ee3f19a0ee9ca36f43364d4efdedf37b
BLAKE2b-256 f1b6df3187016f144444f4dbb7f7bf1a8d23e8e7b4918326a9197ed9fbcf826b

See more details on using hashes here.

Provenance

The following attestation bundles were made for taskito-0.16.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: publish.yml on ByteVeda/taskito

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file taskito-0.16.0-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for taskito-0.16.0-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 305fc5f215d860849953ced205dc215091ce182c96fe2236d1c498bf21b7dfc7
MD5 1a1938e65bdc3cacba747ce47ef71b84
BLAKE2b-256 7fc7b440230d6c34bec448f51d5d8a8a3d19a40c9fd4d0b2f418106546065a42

See more details on using hashes here.

Provenance

The following attestation bundles were made for taskito-0.16.0-cp310-cp310-macosx_10_12_x86_64.whl:

Publisher: publish.yml on ByteVeda/taskito

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page