Celery bulk tasks
Project description
bulk-task
Package bulk-task provide an easy way to call lazy functions in bulk.
Installation
$ pip install bulk-task
Example
from dataclasses import dataclass
from bulk_task import BulkTask
bulk_task = BulkTask()
# It can be a dataclass or a Pydantic model.
@dataclass
class DataclassModel:
name: str
@bulk_task
def func(args: List[DataclassModel]):
print(arg.name for arg in args)
# Push lazy calls.
func.push('name1')
func.push('name2')
# Bulk consume lazy calls.
bulk_task.consume()
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
bulk_task-0.0.2.tar.gz
(4.0 kB
view hashes)
Built Distribution
Close
Hashes for bulk_task-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 144afc62e159a61bb6148806c6ca5e555a2e20d94ccb1473d4d27b4e2c1ae408 |
|
MD5 | d91b86087b9ead8bee84344a718e6d23 |
|
BLAKE2b-256 | 0afdb2a60b864f60ca5de9f6e1d8a91945960e5fd0d8a5062e4a206e05b9acc7 |