Skip to main content

A concurrent.futures.Executor implementation using Celery as backend

Project description

Celery Executor

PyPI version Build Status Read The Docs PyUP

A concurrent.futures.Executor implementation using Celery as backend


The package provides a CeleryExecutor implementing the interface of concurrent.futures.Executor

>>> from celery_executor.executors import CeleryExecutor
>>> executor = CeleryExecutor()
>>> for result in, ['one', 'two', 'three']):
...     print(result)

Beware that the interface can yield the results out of order, if later ones got to finish first.


This executor frees the developer to the burden of mark every single task function with the Celery decorators, and to import such tasks on the Worker beforehand. But does not frees from sending the code to the Worker.

The function sent to should be pickable on the client (caller of .map() or .submit()) and should be unpickable on the Celery Worker handling the "Task" sent. Is not possible to send lambdas for example.

As Celery assumes that is to the developer to put the needed code on the Worker, be sure that the function/partial code sent to CeleryExecutor to exist on the Worker.

To Be Done

  • <input type="checkbox" disabled="" /> Document the CeleryExecutor.__init__() nonstandard extra options predelay, postdelay and applyasync_kwargs.
  • <input type="checkbox" disabled="" /> Test behaviours of canceling a Task when canceling a Future
  • <input type="checkbox" disabled="" /> Test behaviours of shutting down executors and trying to send new tasks
  • <input type="checkbox" disabled="" /> Find a way to test the RUNNING state of Celery Tasks, as its events are not propagated by the test worker Celery provides


This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

======= History

0.1.0 (2018-05-25)

  • First release on PyPI.

Project details

Download files

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

Files for celery-executor, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size celery_executor-0.2.0-py2.py3-none-any.whl (4.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size celery-executor-0.2.0.tar.gz (12.6 kB) File type Source Python version None Upload date Hashes View

Supported by

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