Skip to main content

Django EZ Tasks

A simple, Django app for managing background tasks with multiple execution backends. Built on Django 6's BackgroundTask API with additional simple backends.

Installation

pip install git+https://github.com/al-eax/django_ez_tasks.git

Quick Start

1. Add to INSTALLED_APPS

In your Django settings.py:

INSTALLED_APPS = [
    # ... other apps
    "django_ez_tasks",
]

2. Configure Task Backends

Add your task configuration to settings.py:

TASKS = {
    "default": {
        "BACKEND": "django_ez_tasks.backends.ThreadedBackend",
    }
}

Or use ThreadPoolBackend for a managed thread pool with configurable workers:

TASKS = {
    "default": {
        "BACKEND": "django_ez_tasks.backends.ThreadPoolBackend",
        "OPTIONS": {
            "max_workers": 4,  # Number of threads in the pool
        }
    }
}

3. Usage

Define a task using the @task decorator:

from django.tasks import task

@task
def send_welcome_email(user_id: int) -> str:
    """Send a welcome email to a new user."""
    user = User.objects.get(id=user_id)
    # Send email logic here...
    return f"Email sent to {user.email}"


# This returns immediately - the task runs in a background thread
result = send_welcome_email.enqueue(user_id=42)

# You can check the result later
print(result.id)  # Task ID for tracking

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

For issues and questions, please visit the GitHub repository.

Metadata

Release files for django-ez-tasks 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-ez-tasks 0.1.0
File Size Uploaded Provenance Actions
django_ez_tasks-0.1.0.tar.gz 4.8 kB Without provenance Details for django_ez_tasks-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-ez-tasks 0.1.0
File Interpreter ABI Platform Actions
django_ez_tasks-0.1.0-py3-none-any.whl Python 3 none any Details for django_ez_tasks-0.1.0-py3-none-any.whl

Total release size: 9.3 kB

Release files / django_ez_tasks-0.1.0.tar.gz

Download URL django_ez_tasks-0.1.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
172ef667ee1377113d39cb13702ddc1671d24775fe5e70caece1775d2a26dc2b
BLAKE2b-256 checksum
How to use checksums
38d77370b7ed4bf68f8b7b0c3912a4d1a05e15ccdd99bf46f498e88e390f30fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.9

Release files / django_ez_tasks-0.1.0-py3-none-any.whl

Download URL django_ez_tasks-0.1.0-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
612cf7c1271138eb044338abc1799639c97951b661aa5109d82f899ec3237c0b
BLAKE2b-256 checksum
How to use checksums
5de4f71e38a76b368f66b4d35931c8d88bf4ca1e0d76b56964ba5a4f5acbd909
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.9

Security for django-ez-tasks 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page