Skip to main content

Celery backend for Django's task framework

Project description

django-tasks-celery

Celery backend for Django 6.0's built-in django.tasks framework. Implements BaseTaskBackend so that @task / enqueue() dispatches to Celery workers.

Installation

pip install django-tasks-celery[celery]

Or with celery-asyncio (same API, async-native rewrite):

pip install django-tasks-celery[celery-asyncio]

Configuration

# settings.py
CELERY_BROKER_URL = "redis://localhost:6379/0"
CELERY_RESULT_BACKEND = "redis://localhost:6379/1"
CELERY_RESULT_EXTENDED = True

TASKS = {
    "default": {
        "BACKEND": "django_tasks_celery.CeleryBackend",
        "QUEUES": ["default"],
    },
}

Usage

from django.tasks import task

@task
def send_email(to, subject, body):
    ...

# Enqueue
result = send_email.enqueue(to="user@example.com", subject="Hello", body="World")

Compatibility

  • Django: 6.0+
  • Celery: 5.4+ (or celery-asyncio)
  • Python: 3.12+

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_tasks_celery-0.1.1.tar.gz (8.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_tasks_celery-0.1.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file django_tasks_celery-0.1.1.tar.gz.

File metadata

  • Download URL: django_tasks_celery-0.1.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for django_tasks_celery-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1c2265627d02e30d162d280503c4b4a9832c4677841c2127bd52be3b61ed3431
MD5 bd925b49693b1a816f77665a22968c96
BLAKE2b-256 8aa08144a9235de7107fda19a4e1aafa0475939bc798c85e61f4f1ea56d6c5e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_tasks_celery-0.1.1.tar.gz:

Publisher: publish.yml on oliverhaas/django-tasks-celery

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

File details

Details for the file django_tasks_celery-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for django_tasks_celery-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bd27edde3b7be2209979af51215ef1eba797b1fe11d93574b09f83fc150f0bfa
MD5 0c77e91e7f7f060d04dd16f6dc0db80f
BLAKE2b-256 3a1bbc131c4b6324bbe25239510ef52d954e69b1d60c1f413afc594bfb8c258c

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_tasks_celery-0.1.1-py3-none-any.whl:

Publisher: publish.yml on oliverhaas/django-tasks-celery

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