Skip to main content

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


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)

Uploaded Source

Built Distribution

bulk_task-0.0.2-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page