django-user-tasks
django-user-tasks is a reusable Django application for managing user-triggered asynchronous tasks. It provides a status page for each such task, which includes a meaningful progress indicator if the task is currently being executed and provides any appropriate text and/or links for output once the task is complete.
In Open edX, such tasks include operations such as exporting or importing a course, sending an email to all the students in a course, uploading a video, and other tasks which often take too long to perform during a single web request (as outlined in OEP-3). However, this has been written with the intention of being useful in a variety of Django projects outside the Open edX platform as well.
Note that this library was created as a consolidation of lessons learned from implementing such tasks in various parts of the Open edX code base. They don’t yet all use this library, but the plan is to over time refactor many of them to do so.
Overview
django-user-tasks is currently a wrapper for Celery (although the hope is that it could also be extended to also support channels and other asynchronous task queues). By extending the provided UserTask class (or adding UserTaskMixin to an existing Task subclass) and providing a user_id task argument, the task’s status is stored in a database table separate from the Celery broker and result store. This UserTaskStatus model allows for full database queries of the tasks that users are most likely to care about while not imposing any restrictions on the Celery configuration most appropriate for the site’s overall needs for asynchronous task processing.
Most of the status updating is handled automatically via Celery’s signals mechanism, but it can be enhanced by:
Overriding the UserTaskMixin methods such as generate_name and calculate_total_steps for particular types of tasks
Calling some of the UserTaskStatus methods like increment_completed_steps and set_state from the task implementation
Saving task output as instances of the UserTaskArtifact model
Documentation
The full documentation is at https://django-user-tasks.readthedocs.org.
License
The code in this repository is licensed under the Apache Software License 2.0 unless otherwise noted.
Please see LICENSE.txt for details.
How To Contribute
Contributions are very welcome.
Please read How To Contribute for details.
Reporting Security Issues
Please do not report security issues in public. Please email security@openedx.org.
Getting Help
Have a question about this repository, or about Open edX in general? Please refer to this list of resources if you need any assistance.
Metadata
Release files for django-user-tasks 4.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| django_user_tasks-4.1.0.tar.gz | 34.8 kB | With provenance | Details for django_user_tasks-4.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_user_tasks-4.1.0-py3-none-any.whl | Python 3 | none | any | Details for django_user_tasks-4.1.0-py3-none-any.whl |
Total release size: 62.1 kB
Release files / django_user_tasks-4.1.0.tar.gz
| Download URL | django_user_tasks-4.1.0.tar.gz |
|---|---|
| Size | 34.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ff238eb2d7f19d97c6de70cd2f5bb6919987edf4c756e4318d7a5495ff8250ad
|
|
BLAKE2b-256 checksum How to use checksums |
82aefdc64b1d0886fe411a1d34fe67f59b3dab793127319f7d314493de77560c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logRelease files / django_user_tasks-4.1.0-py3-none-any.whl
| Download URL | django_user_tasks-4.1.0-py3-none-any.whl |
|---|---|
| Size | 27.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d664e455a59468a7cae27627c71189e224df89df2f6978539c954e5861ed1fd9
|
|
BLAKE2b-256 checksum How to use checksums |
20ead8ae36b667dd2af11c0bbfaa9bd3f7d3de1e8f468849b26e2a70fc111b84
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logSecurity for django-user-tasks 4.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for django_user_tasks-4.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logA 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.