Skip to main content

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)

Uploaded Source

Built Distribution

tx_parallex-0.0.22-py3-none-any.whl (7.5 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