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 show django-vtasks outperforms Celery in both enqueue and processing throughput:

  • 1.9x faster enqueue (~1,200 ops/s vs ~650 ops/s)
  • 1.5x faster processing (~250 ops/s vs ~166 ops/s)

See Benchmarks for full methodology and results.

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.0.tar.gz (31.2 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.0-py3-none-any.whl (43.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_vtasks-2.1.0.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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.0.tar.gz
Algorithm Hash digest
SHA256 38e96a693269131c516c459807be309fe5e63d408d9cb58629e1dbc79466ed0a
MD5 909119608971731973eb543665067e1c
BLAKE2b-256 c406ecf6329f659e7d94e5a4c7619f675f4b5ab0afd7b0396fec40d3b4cf9e4a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: django_vtasks-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 43.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cc6b2834ccf37bf269bb31f36f99ad703d1f6851930d848110ca73f596a60e5a
MD5 103362180a8be160cf05eaaebdf09f42
BLAKE2b-256 5523877525d20106a41160ebc9af863ca2ed119f31e3fc71627a6d9a95f8bac3

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