Skip to main content

A simple python script manager

Project description

KEWR

A simple python script runner.

Many processes we use python for consist of a set of scripts, with particular inputs and outputs. tskr can be used to track all the scripts in a workflow and run them independently.

For example, our project might include scripts to preprocess some data, do some analysis, then produce some plots. Each of these scripts might take arguments or options. We might complete the sequence like this

python ./preprocess_script.py /path/to/data
python ./analysis_script.py argument_1 --optional-flag  
python ./plotting_script.py /path/to/plot/dir

tskr aims to keep our scripts organized along with their arguments.

Installation

pip install kewr

Usage

First create a new config file

python -m kewr create #creates a new tskr config file in the directory

In this file we define the stages of our script sequence. The config is a .toml file with sections for each stage.

[stage1]
help = "description of what the stage does"
cmd = "python example_script.py --option"
deps = ["/path/to/input/file"]
outs = ["/path/to/output/file"]

List the available stages with

python -m kewr list

Run each stage with

python -m kewr run stage1

You can also run multiple stages at once with

python -m kewr run stage1 stage2 stage3

Or run all stages at once

python -m kewr run all

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

kewr-0.3.0.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

kewr-0.3.0-py3-none-any.whl (4.6 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