Skip to main content

A small Django DRF extension for managing background task with celery

Project description

django-task

django-task is a library designed to assist you in tracking Celery tasks within your Django project. It provides a seamless integration with your current database and offers RESTful APIs for managing and monitoring your tasks.

Features

  • Task Tracking: With django-task, you can easily track the status, progress, and result of your Celery tasks. The library stores this information in your database, allowing you to retrieve and analyze task data at any time.

  • RESTful APIs: django-task exposes a set of RESTful APIs that enable you to interact with your Celery tasks programmatically. You can create, update, delete, and retrieve tasks using these APIs, providing flexibility in managing your task workflow.

  • Integration with Celery: This library seamlessly integrates with Celery, a widely-used distributed task queue framework. You can use all the powerful features of Celery, such as task scheduling, distributed processing, and task retries, while leveraging django-task for task tracking and management.

Installation

You can install django-task using pip:

pip install django-task

Make sure you have Celery and Django installed as well.

Usage

Once installed and configured, you can start tracking your Celery tasks using django-task. Here's a basic example of how to use the library:

from django_task.handlers import TaskHandler

# Create a new task
@celery_app.task(
    name="some_task", queue="default_queue", base=TaskHandler
)
def some_task(bulk_account_data, *args, **kwargs):
    pass

Using this annotation, you can track the task status in your db.

For detailed usage instructions and available APIs, please refer to the documentation.

Contributing

Contributions to django-task are welcome! If you encounter any issues, have suggestions, or would like to contribute new features, please feel free to open an issue or submit a pull request on the GitHub repository.

When contributing, please ensure that you follow the existing coding style, write tests for new functionality, and update the documentation accordingly.

License

This project is licensed under the MIT License.

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_bg_task-0.4.2.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_bg_task-0.4.2-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file django_bg_task-0.4.2.tar.gz.

File metadata

  • Download URL: django_bg_task-0.4.2.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for django_bg_task-0.4.2.tar.gz
Algorithm Hash digest
SHA256 eae2d0c5ba7903d4d0d0dcf2738646967d2d9a2fc012e46b9ea150a5d1f26ebe
MD5 e648ad7208753965a25df619911f56f7
BLAKE2b-256 3b99aeb9d73c8a306f9d2455ada0a4c6a37927ced2aec30c2d7d299f7bbcd8e3

See more details on using hashes here.

File details

Details for the file django_bg_task-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: django_bg_task-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for django_bg_task-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 535a67b614a82d1e8e1258ea89433934f124436c788b08d39425ff19afd92ba8
MD5 25cc1b4ce5de92fbd4598fb3b70abd9f
BLAKE2b-256 243cb9499c49952b222a1a9efd5919ee9d4bf09efaed7affda7d764fb371d5de

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