A job queue with data dependencies
Project description
parallex
Introduction
A queue with dependencies
Usage
from parallex import run
ret = run(number_of_workers = 4, specf = "spec.yml", dataf = "data.yml")
Spec
Each task is given a dict called data
.
let
The let
task sets data
type: let
obj:
<var>: <value>
...
<var>: <value>
sub: <subtask>
map
The map
task reads a list coll
from data
and applies a list of subtasks to each member of the list. The members will be assigned to var
in data
passed to those tasks
type: map
coll: <variable name for collection>
var: <variable name>
sub: <subtask>
top
The top
task toplogically sorts subtasks.
type: top
sub: <subtasks>
It reads the depends_on
property of subtasks, which has format:
<task name>: [<param>, ..., <param>]
...
<task name>: [<param>, ..., <param>]
The result of a task will be assigned to the parameters that it maps to.
python
The python
task runs a python function. It reads parameters from data
.
type: python
name: <name>
mod: <module>
func: <function>
params: <parameters>
depends_on: <dependencies>
params
are the same format as depends_on
Data
data can be arbitrary yaml
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
tx-parallex-0.0.22.tar.gz
(7.2 kB
view hashes)
Built Distribution
Close
Hashes for tx_parallex-0.0.22-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b8d91f6e06791dbfd9c01d0f4322797ac069f7380c110d39eb7eed0368bad84 |
|
MD5 | 7262cecc7025f1bf909b061753e53b79 |
|
BLAKE2b-256 | 4b034247d215d8b8c50b220749a3324a8be8a659cfefa149d99f5afea37bc24f |