Skip to main content

A very fast valkey/postgres django tasks backend.

Project description

django-vtasks

Valkey Tasks. Very Fast Tasks.

From the team at GlitchTip, django-vtasks is a lightweight, async-first task queue for Django 6.0+.

Status: Newly feature complete. Beta quality. Use and report bugs.

Why django-vtasks?

  • Async-first - Native asyncio worker for high-performance I/O
  • Flexible backends - Start with Postgres, scale to Valkey without rewriting code
  • Lightweight - Minimal dependencies, modern codebase
  • Embedded mode - Run tasks in your ASGI server or as standalone workers

Features

  • Dual backends: Database (Postgres/SQLite/MySQL) and Valkey (Redis-compatible)
  • Scheduled tasks with cron syntax
  • Unique tasks (Mutex and Throttle patterns)
  • Batch processing for high-throughput queues
  • Prometheus metrics
  • Django admin interface for task management

Admin Interface

Requirements

  • Python 3.12+
  • Django 6.0+
  • Valkey 7+ (or Redis 7+) for Valkey backend

Quick Start

pip install django-vtasks

# For Valkey backend support:
pip install "django-vtasks[valkey]"
# settings.py
INSTALLED_APPS = ["django_vtasks", "django_vtasks.db"]

TASKS = {
    "default": {
        "BACKEND": "django_vtasks.backends.db.DatabaseTaskBackend",
    }
}
# myapp/tasks.py
from django_vtasks import task

@task
def send_email(user_id):
    # Your task logic
    pass
# In your views
send_email.enqueue(user_id)
# or async
await send_email.aenqueue(user_id)
# Run the worker
python manage.py runworker

Performance

Benchmarks simulate async Django views dispatching tasks — the real ASGI use case.

Scenario (Sleep 10ms) Enqueue (ops/s) Process (ops/s) Peak RSS (MB) Valkey Conns
VTasks 5,203 3,796 76 3
Celery Threads 2,228 894 123 11
RQ 436 25 170 4

VTasks: 4x faster processing, 2x faster enqueue, 38% less memory vs Celery.

See Benchmarks for full methodology, cloud latency results, and how to reproduce.

Documentation

Full documentation is available at django-vtasks.glitchtip.com

Contributing

We welcome contributions! Please see CONTRIBUTING.md for details.


Built by the GlitchTip team.

Project details


Download files

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

Source Distribution

django_vtasks-2.1.2.tar.gz (34.3 kB view details)

Uploaded Source

Built Distribution

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

django_vtasks-2.1.2-py3-none-any.whl (46.4 kB view details)

Uploaded Python 3

File details

Details for the file django_vtasks-2.1.2.tar.gz.

File metadata

  • Download URL: django_vtasks-2.1.2.tar.gz
  • Upload date:
  • Size: 34.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for django_vtasks-2.1.2.tar.gz
Algorithm Hash digest
SHA256 5cff65f8e9549ba6eb750fe765ec790e4e1b51ef105cfadd2ce9c0fc0153c5c9
MD5 ff1a035a470e818420d5d0f7e43b9b9b
BLAKE2b-256 5870fc821895ecebe0797cdcfe1024ed1993fc5a146b98d66a73be10903890f9

See more details on using hashes here.

File details

Details for the file django_vtasks-2.1.2-py3-none-any.whl.

File metadata

  • Download URL: django_vtasks-2.1.2-py3-none-any.whl
  • Upload date:
  • Size: 46.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for django_vtasks-2.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2dff7248a051639e7f0144af3383bd1cd9f863aabb308fdc5514b0f587a3a6bd
MD5 c707186339c03e3af0f65ec4d4e24e68
BLAKE2b-256 d1433b8e867fdcaabaf85b1a2fad9a6f342d05a5bd5a8f10f102f36ddc781fa5

See more details on using hashes here.

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