Skip to main content

A RabbitMQ asynchronous task queue for Django.

Project description

.. image::

.. image::

.. image::

.. image::

.. image::

.. image::

.. image:: /docs/source/images/carrot-logo-big.png
:align: center

**django-carrot** is a lightweight task queue backend for Django projects that uses the RabbitMQ message broker, with
an emphasis on quick and easy configuration and task tracking


Install django-carrot:

.. code-block:: bash

pip install django-carrot

Install and run RabbitMQ

.. code-block:: bash

brew install rabbitmq
brew services start rabbitmq


1. Add carrot to your Django project's settings module:

.. code-block:: python


2. Apply the carrot migrations to your project's database:

.. code-block:: python

python migrate carrot


To start the service:

.. code-block:: bash

python carrot_daemon start

To run tasks asynchronously:

.. code-block:: python

from carrot.utilities import publish_message

def my_task(**kwargs):
return 'hello world'

publish_message(my_task, hello=True)

To schedule tasks to run at a given interval

.. code-block:: python

from carrot.utilities import create_scheduled_task

create_scheduled_task(my_task, {'seconds': 5}, hello=True)

.. note::
The above commands must be made from within the Django environment


A sample docker config is available `here <>`_

Full documentation

The full documentation is available `here <>`_


If you are having any issues, please `log an issue <>`_


Django-carrot uses `Packagr <>`_ to share development builds. If you'd like access to it,
please send me your email address at so I can give you access


The project is licensed under the Apache license.

Icons made by Trinh Ho from ` <>`_ is licensed by CC 3.0 BY

Project details

Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-carrot-1.5.0.tar.gz (203.4 kB view hashes)

Uploaded source

Built Distribution

django_carrot-1.5.0-py3-none-any.whl (210.4 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page