Skip to main content

Celery Batches

https://img.shields.io/pypi/v/celery-batches.svg https://github.com/clokep/celery-batches/actions/workflows/main.yml/badge.svg Documentation Status

Celery Batches provides a Task class that allows processing of multiple Celery task calls together as a list. The buffer of tasks calls is flushed on a timer and based on the number of queued tasks.

Some potential use-cases for batching of task calls include:

  • De-duplicating tasks.

  • Accumulating / only handling the latest task with similar arguments.

  • Bulk inserting / updating of data.

  • Tasks with expensive setup that can run across a range of arguments.

What do I need?

celery-batches version runs on,

  • Python (3.9, 3.10, 3.11, 3.12, 3.13, 3.14)

  • PyPy (3.10, 3.11)

And is tested with Celery ~= 5.0.

If you’re running an older version of Python, you need to be running an older version of celery-batches, the last version supporting each Python version is listed below:

  • Python 2.7: celery-batches 0.3.

  • Python 3.4: celery-batches 0.2.

  • Python 3.5: celery-batches 0.3.

  • Python 3.6: celery-batches 0.5.

  • Python 3.7: celery-batches 0.7.

  • Python 3.8: celery-batches 0.9.

If you’re running an older version of Celery, you need to be running an older version of celery-batches:

  • Celery < 4.0: Use celery.contrib.batches instead.

  • Celery 4.0 - 4.3: celery-batches 0.3.

  • Celery 4.4: celery-batches 0.7.

  • Celery 5.0 - 5.1: celery-batches 0.9.

History

Celery Batches was distributed as part of Celery (as celery.contrib.batches) until Celery 4.0. This project updates the Batches code to maintain compatiblity with newer versions of Celery and other fixes. See the Changelog for details.

Additionally, this repository includes the full history of the code from celery.contrib.batches, but rewritten to the celery_batches/__init__.py file.

Release files for celery-batches 0.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for celery-batches 0.11
File Size Uploaded
celery_batches-0.11.tar.gz 8.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for celery-batches 0.11
File Interpreter ABI Platform
celery_batches-0.11-py3-none-any.whl Python 3 none any Details

Total release size: 17.2 kB

Release files / celery_batches-0.11.tar.gz

Download URL celery_batches-0.11.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a6a408b80d2dddb677b25113a3228a1a5ff00936eb34eedaa3932138a451a9b6
BLAKE2b-256 checksum
How to use checksums
1c3b70d153e4a394ccab0d4cdb53876c46e62e607e944d20290c34f9887d73a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.11

Release files / celery_batches-0.11-py3-none-any.whl

Download URL celery_batches-0.11-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3868f621a2805154bc0423f61a49d5fec5b91272c6756f293980b2689ab9da63
BLAKE2b-256 checksum
How to use checksums
edea8cf611e1350abaafdcaba372b7ea40ace6fbaffe2d2ed89616b23ec4e649
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.11

Release history Release notifications | RSS feed

This release

0.11 This release

2 release files

0.10

2 release files

0.9

2 release files

0.8.1

2 release files

0.8

2 release files

0.7

2 release files

0.6

2 release files

0.5

2 release files

0.4

2 release files

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page