Skip to main content

Run pipelines similar to github actions

Project description

kaxi

Run pipelines similar to github actions

Package version Code style: black Semantic Versions License

Installation

pip install kaxi

Usage

You can run a pipeline by running the following command:

kaxi <pipeline_file>.yaml

Or you can programmatically run a pipeline by running the following command:

from kaxi import Runner

runner = Runner(your_pipeline)
runner.execute()

Pipeline file

A pipeline file is a yaml file that contains a list of steps to execute. Each step is a dictionary with the following keys:

  • uses: The callable to execute (e.g. pandas.read_csv)
  • name (optional): The name of the step
  • with (optional): A dictionary of arguments to pass to the callable

If you want to use arguments without the respective name, you can use the args key inside the with dictionary.

Example

verbose: true

steps:
  - uses: os.path.isfile
    name: file_exists
    with:
      path: example.yaml

  - uses: kaxi.log.info
    with:
      args:
        - ${file_exists}

Environment variables

You can use environment variables in your pipeline file by using the ${ENV_VAR} syntax.

To define environment variables, you can set them inside the enviroment key:

environment:
  ENV_VAR: value

Another way to use environment variables is to use the ouput of a step as an environment variable, this can be done by using the name of the step inside the ${} syntax:

steps:
  - uses: os.path.isfile
    name: file_exists
    with:
      path: example.yaml

  - uses: kaxi.log.info
    with:
      args:
        - ${file_exists}

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

kaxi-0.1.1.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

kaxi-0.1.1-py3-none-any.whl (5.1 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