This package implements a queue that distributes jobs over multiple processes.
The code is distributed under the terms of the BSD 3-Clause license (see
LICENSE
), and the documentation is distributed under the terms of the
Creative Commons BY-SA 4.0 license.
import parq
# Define a job that prints its input argument.
def my_job(n):
print(f'Running job #{n}')
# Define the input argument for each job.
job_inputs = [(i,) for i in range(10)]
# Run these 10 jobs using 4 processes.
success = parq.run(my_job, job_inputs, n_proc=4)
assert success
See the online documentation for further details.
To install the latest release:
pip install parq
To install the latest development version, clone this repository and run:
pip install .