Skip to main content

A utility class to run plumbum commands concurrently

Project description

Fire and forget Multiple Commands

import plumbum as pb
from pb_job_manager import PBJobManager
pbjm = PBJobManager(max_procs=4)
pbjm.add_job(pb.cmd.grep["foo", "input.txt"] | pb.cmd.sort > "foo.txt")
pbjm.add_job(pb.cmd.grep["bar", "input.txt"] | pb.cmd.sort > "bar.txt")
pbjm.add_job(pb.cmd.grep["baz", "input.txt"] | pb.cmd.sort > "baz.txt")   # run until all jobs are finished

Creating Jobs with Callbacks

TODO: Example

Jobs with dependencies

TODO: Example

Result Iteration

TODO: Example

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

pb_job_manager-0.2.2.tar.gz (3.8 kB view hashes)

Uploaded source

Built Distribution

pb_job_manager-0.2.2-py2.py3-none-any.whl (5.5 kB view hashes)

Uploaded 2 7

Supported by

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