django-carrot 1.5.0
pip install django-carrot
Latest version
Released:
A RabbitMQ asynchronous task queue for Django.
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: Apache Software License (Apache-2.0)
- Author: Christoper Davies
- Maintainer: Christoper Davies
- Requires: Python >=3.6.3, <4.0.0
Classifiers
- Development Status
- Environment
- Framework
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
Project description
.. image:: https://coveralls.io/repos/github/chris104957/django-carrot/badge.svg?branch=master
:target: https://coveralls.io/github/chris104957/django-carrot?branch=master
.. image:: https://readthedocs.org/projects/django-carrot/badge/?version=latest
:target: http://django-carrot.readthedocs.io/en/latest/?badge=
.. image:: https://travis-ci.org/chris104957/django-carrot.svg?branch=master
:target: https://travis-ci.org/chris104957/django-carrot.svg?branch=master
.. image:: https://coveralls.io/repos/github/chris104957/django-carrot/badge.svg?branch=master
:target: https://coveralls.io/github/chris104957/django-carrot?branch=master)
.. image:: https://badge.fury.io/py/django-carrot.svg
:target: https://badge.fury.io/py/django-carrot
.. image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg
:target: https://opensource.org/licenses/Apache-2.0
.. 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
Installation
------------
Install django-carrot:
.. code-block:: bash
pip install django-carrot
Install and run RabbitMQ
.. code-block:: bash
brew install rabbitmq
brew services start rabbitmq
Configuration
-------------
1. Add carrot to your Django project's settings module:
.. code-block:: python
INSTALLED_APPS = [
...
'carrot',
...
]
2. Apply the carrot migrations to your project's database:
.. code-block:: python
python manage.py migrate carrot
Usage
-----
To start the service:
.. code-block:: bash
python manage.py 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
Docker
------
A sample docker config is available `here <https://github.com/chris104957/django-carrot-docker>`_
Full documentation
------------------
The full documentation is available `here <https://django-carrot.readthedocs.io/>`_
Support
-------
If you are having any issues, please `log an issue <https://github.com/chris104957/django-carrot/issues/new>`_
Contributing
------------
Django-carrot uses `Packagr <https://www.packagr.app/>`_ to share development builds. If you'd like access to it,
please send me your email address at christopherdavies553@gmail.com so I can give you access
License
-------
The project is licensed under the Apache license.
Icons made by Trinh Ho from `www.flaticon.com <www.flaticon.com>`_ is licensed by CC 3.0 BY
:target: https://coveralls.io/github/chris104957/django-carrot?branch=master
.. image:: https://readthedocs.org/projects/django-carrot/badge/?version=latest
:target: http://django-carrot.readthedocs.io/en/latest/?badge=
.. image:: https://travis-ci.org/chris104957/django-carrot.svg?branch=master
:target: https://travis-ci.org/chris104957/django-carrot.svg?branch=master
.. image:: https://coveralls.io/repos/github/chris104957/django-carrot/badge.svg?branch=master
:target: https://coveralls.io/github/chris104957/django-carrot?branch=master)
.. image:: https://badge.fury.io/py/django-carrot.svg
:target: https://badge.fury.io/py/django-carrot
.. image:: https://img.shields.io/badge/License-Apache%202.0-blue.svg
:target: https://opensource.org/licenses/Apache-2.0
.. 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
Installation
------------
Install django-carrot:
.. code-block:: bash
pip install django-carrot
Install and run RabbitMQ
.. code-block:: bash
brew install rabbitmq
brew services start rabbitmq
Configuration
-------------
1. Add carrot to your Django project's settings module:
.. code-block:: python
INSTALLED_APPS = [
...
'carrot',
...
]
2. Apply the carrot migrations to your project's database:
.. code-block:: python
python manage.py migrate carrot
Usage
-----
To start the service:
.. code-block:: bash
python manage.py 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
Docker
------
A sample docker config is available `here <https://github.com/chris104957/django-carrot-docker>`_
Full documentation
------------------
The full documentation is available `here <https://django-carrot.readthedocs.io/>`_
Support
-------
If you are having any issues, please `log an issue <https://github.com/chris104957/django-carrot/issues/new>`_
Contributing
------------
Django-carrot uses `Packagr <https://www.packagr.app/>`_ to share development builds. If you'd like access to it,
please send me your email address at christopherdavies553@gmail.com so I can give you access
License
-------
The project is licensed under the Apache license.
Icons made by Trinh Ho from `www.flaticon.com <www.flaticon.com>`_ is licensed by CC 3.0 BY
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: Apache Software License (Apache-2.0)
- Author: Christoper Davies
- Maintainer: Christoper Davies
- Requires: Python >=3.6.3, <4.0.0
Classifiers
- Development Status
- Environment
- Framework
- Intended Audience
- License
- Operating System
- Programming Language
- Topic
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
Built Distribution
File details
Details for the file django-carrot-1.5.0.tar.gz
.
File metadata
- Download URL: django-carrot-1.5.0.tar.gz
- Upload date:
- Size: 203.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.12 CPython/3.6.3 Linux/4.4.0-101-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 643611889459c00d137b9a3db504746857209fe61f41a70dabb8715350487a9f |
|
MD5 | 5cacf3c55946b45b2f9b847a3eeb37c6 |
|
BLAKE2b-256 | 6f21ddee1aa4d94c49dbaca2310b6c5ddd4c39309da79cf10bf417e1edbf67a5 |
File details
Details for the file django_carrot-1.5.0-py3-none-any.whl
.
File metadata
- Download URL: django_carrot-1.5.0-py3-none-any.whl
- Upload date:
- Size: 210.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.12 CPython/3.6.3 Linux/4.4.0-101-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1fbe07471e1e3a53b2190a3082d4a7dc8201a1f3bc8a70ccc821968a5225528 |
|
MD5 | 21fc81c24ddae86ac210282afedbedbf |
|
BLAKE2b-256 | ebcc584b9bbc68932445869f7391feef9475bae7f0261e2c3c00fbd5c1cd4e83 |