skip to navigation
skip to content

carotte 0.0.9

Carotte is a very lightweight Celery on zmq

Latest Version: 0.2.0

Carotte is a very lightweight Celery on zmq.


pip install carotte

Getting started

Create your

from carotte import task

def hello_world(name):
    return 'Hello %s!' % name

Run your worker (default on “tcp://”):

carotte worker --tasks-module tasks

Run your client:

>>> from carotte import Client
>>> client = Client()
>>> task = client.run_task('hello_world', ['foo'])
>>> task.success
>>> True
>>> task.result
>>> 'Hello foo!'

Scheduled tasks

Carotte is not a scheduler, its an asynchronous tasks runner. But you can really set up scheduled tasks with schedule.


import requests
from carotte import task

def get(url):
    r = requests.get(url)
    if r.status_code != 200:
        # Do stuff
        return False
    return True


import time
import schedule
from carotte import client

client = Client()
schedule.every(10), 'get', [''])

while True:

Run your worker and your scheduler:

carotte worker --tasks-module tasks
# In another terminal
File Type Py Version Uploaded on Size
carotte-0.0.9.tar.gz (md5) Source 2014-04-18 7KB
  • Downloads (All Versions):
  • 30 downloads in the last day
  • 116 downloads in the last week
  • 548 downloads in the last month