Metadata-Version: 2.4
Name: django-tasks-celery
Version: 0.1.1
Summary: Celery backend for Django's task framework
Project-URL: Homepage, https://github.com/oliverhaas/django-tasks-celery
Project-URL: Documentation, https://oliverhaas.github.io/django-tasks-celery/
Project-URL: Repository, https://github.com/oliverhaas/django-tasks-celery.git
Project-URL: Changelog, https://oliverhaas.github.io/django-tasks-celery/reference/changelog/
Author-email: Oliver Haas <ohaas@e1plus.de>
License: MIT
License-File: LICENSE
Keywords: backend,celery,django,queue,tasks
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Framework :: Celery
Classifier: Framework :: Django
Classifier: Framework :: Django :: 6.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Requires-Python: >=3.12
Requires-Dist: django<7,>=6.0
Provides-Extra: celery
Requires-Dist: celery<6,>=5.4; extra == 'celery'
Provides-Extra: celery-asyncio
Requires-Dist: celery-asyncio>=6.0.0a1; extra == 'celery-asyncio'
Description-Content-Type: text/markdown

# 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

```bash
pip install django-tasks-celery[celery]
```

Or with [celery-asyncio](https://github.com/oliverhaas/celery-asyncio) (same API, async-native rewrite):

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

## Configuration

```python
# 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

```python
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+
