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.7

pypyr runs on Linux, MacOS & Windows. pypyr also runs fine on CI servers & containers - pretty much anywhere with a Python run-time will work.

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:
      py: 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 at the pypyr community discussion forum!

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-5.5.0.tar.gz (114.5 kB view details)

Uploaded Source

Built Distribution

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

pypyr-5.5.0-py3-none-any.whl (159.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pypyr-5.5.0.tar.gz
  • Upload date:
  • Size: 114.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for pypyr-5.5.0.tar.gz
Algorithm Hash digest
SHA256 4ba7cee2f6d5a70b8c4dc4214012b0589e89abd9a6502de25b1d37b8bde01b8e
MD5 adaf7864e73db2684c6d32f371355f53
BLAKE2b-256 f5e676735aaba5078a31f98c8e0855b23dc5bcd99602cfd270d43c82cb0e2efd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pypyr-5.5.0-py3-none-any.whl
  • Upload date:
  • Size: 159.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.10.4

File hashes

Hashes for pypyr-5.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d59addd0839ba7d33909274220a3c75c828aa2ae27455e4e1b66764019a1985f
MD5 2e6fc6801d0166c72841aec79009c71d
BLAKE2b-256 2d3a4fa6122d298cf30e735eda2b204dc3620b388f61568bccbec87067011c1d

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