Skip to main content

task-runner for automation pipelines defined in yaml. cli & api.

Project description

pypyr task runner for automation pipelines

pypyr automation task runner

All documentation is here: https://pypyr.io/

build status coverage status pypi version apache 2.0 license

pypyr

pronounce how you like, but I generally say piper as in "piping down the valleys wild"

pypyr is a free & open-source task-runner that lets you define and run sequential steps in a pipeline.

Like a turbo-charged shell script, but less finicky. Less annoying than a makefile.

pypyr runs pipelines defined in yaml. A pipeline is pretty much anything you want to automate with a sequence of steps.

Automate anything by combining commands, different scripts in different languages & applications into one pipeline process.

You can run loops, conditionally execute steps based on conditions you specify, wait for status changes before continuing, break on failure conditions or swallow errors. Pretty useful for orchestrating continuous integration, continuous deployment & devops operations.

pypyr gives you simple variable substitution & configuration file management so you can read, merge and write configuration files to and from yaml, json or just text.

Installation

$ pip install --upgrade pypyr

Tested against Python >=3.6

Stuck with an older version of python? Want to run pypyr in an environment that you don't control, like a CI server somewhere?

You can use the official pypyr docker image as a drop-in replacement for the pypyr executable.

$ docker run pypyr/pypyr echo "Ceci n'est pas une pipe"

Usage

This is a pipeline

Example pipeline that runs a sequence of steps and takes an optional custom cli input argument:

# ./show-me-what-you-got.yaml
context_parser: pypyr.parser.keyvaluepairs
steps:
  - name: pypyr.steps.echo
    in:
      echoMe: o hai!
  - name: pypyr.steps.cmd
    in:
      cmd: echo any cmd you like
  - name: pypyr.steps.shell
    in:
      cmd: echo ninja shell power | grep '^ninja.*r$' 
  - name: pypyr.steps.py
    in:
      pycode: print('any python you like')
  - name: pypyr.steps.cmd
    while:
      max: 3
    in:
      cmd: echo gimme a {whileCounter}
  - name: pypyr.steps.cmd
    foreach: [once, twice, thrice]
    in:
      cmd: echo say {i}
  - name: pypyr.steps.default
    in:
      defaults:
        sayBye: False
  - name: pypyr.steps.echo
    run: '{sayBye}'
    in:
      echoMe: k bye!

This is how you run a pipeline

This is what happens when you run this pipeline:

$ pypyr show-me-what-you-got
o hai!
any cmd you like
ninja shell power
any python you like
gimme a 1
gimme a 2
gimme a 3
say once
say twice
say thrice

$ pypyr show-me-what-you-got sayBye=true  
o hai!
any cmd you like
ninja shell power
any python you like
gimme a 1
gimme a 2
gimme a 3
say once
say twice
say thrice
k bye!

Help!

Don't Panic! Check the pypyr technical docs to begin. For help, community & talk, check pypyr twitter, or join the chat on discord!

Contribute

Developers

For information on how to help with pypyr, run tests and coverage, please do check out the contribution guide.

Bugs

Well, you know. No one's perfect. Feel free to create an issue.

License

pypyr is free & open-source software distributed under the Apache 2.0 License.

Please see LICENSE file in the root of the repo..

Copyright 2017 the pypyr contributors.

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

pypyr-4.2.0.tar.gz (76.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pypyr-4.2.0-py3-none-any.whl (106.6 kB view details)

Uploaded Python 3

File details

Details for the file pypyr-4.2.0.tar.gz.

File metadata

  • Download URL: pypyr-4.2.0.tar.gz
  • Upload date:
  • Size: 76.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for pypyr-4.2.0.tar.gz
Algorithm Hash digest
SHA256 8d97f4dd7f0c37a574ce88093dbcd431b162db81fe8708f83955fac78eaa6977
MD5 626bd8a01898c218effe3d343a2f8b5d
BLAKE2b-256 c09138d4960a48aec73f6f60bd9acf16dfd5070d86b50e226dacf7fdee0a0572

See more details on using hashes here.

File details

Details for the file pypyr-4.2.0-py3-none-any.whl.

File metadata

  • Download URL: pypyr-4.2.0-py3-none-any.whl
  • Upload date:
  • Size: 106.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

File hashes

Hashes for pypyr-4.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf0768d70a963dd6142d15e9ecef0951c5ab76bf52acfe4ad86322127f860755
MD5 55983d80e30608bbd935c97d2bcf25d6
BLAKE2b-256 f38cbad4f3376c32e991efef93af74646a4add4fc0e34af53ba6fe006bd5bb5b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page