built-in steps
pypyr has a whole bunch of ready-made built-in steps to make your life easier. Making your own custom step is super easy too.
title | description | input context |
---|---|---|
add | Add item to a set. | add (dict) |
append | Append item to a list. | append (dict) |
assert | Stop pipeline if item in context is not as expected. | assert (dict) |
call | Call another step-group. Continue from the same place after the called groups complete. | call (dict | str) |
cmd | Run any external program, command, script. | cmd (dict | str | list) |
cmds | Run external programs, commands & scripts concurrently in parallel. | cmds (dict | list) |
configvars | Inject variables from config into pipeline. | |
contextclear | Remove specified items from context. | contextClear (list) |
contextclearall | Wipe the entire context. | |
contextcopy | Copy entire context keys. | contextCopy (dict) |
contextmerge | Merges values into context, preserving the existing context hierarchy. | contextMerge (dict) |
contextsetf | Old name for set . Use set instead. | contextSetf (dict) |
debug | Pretty print context to output. | debug (dict) |
default | Set values if they do not exist already. | defaults (dict) |
echo | Echo context value of echoMe to the output. | echoMe (any) |
env | Get, set or unset $ENVs. | env (dict) |
envget | Get $ENVs & use a default fallback if they don’t exist. | envget (list) |
fetchjson | Load json file into pypyr context. | fetchJson (dict) |
fetchtoml | Load toml file into pypyr context. | fetchToml (dict) |
fetchyaml | Load yaml file into pypyr context. | fetchYaml (dict) |
fileformat | Find & replace substitution {tokens} in any file. | fileFormat (dict) |
fileformatjson | Find & replace substitution {tokens} in a json file. | fileFormatJson (dict) |
fileformattoml | Find & replace substitution {tokens} in a toml file. | fileFormatToml (dict) |
fileformatyaml | Find & replace substitution {tokens} in a yaml file. | fileFormatYaml (dict) |
fileread | Read file into pypyr context. | fileRead (dict) |
filereplace | Find & replace any arbitrary search strings in a file. | fileReplace (dict) |
filewrite | Write payload to file. | fileWrite (dict) |
filewritejson | Write payload to file in json format. | fileWriteJson (dict) |
filewritetoml | Write payload to file in toml format. | fileWriteToml (dict) |
filewriteyaml | Write payload to file in yaml format. | fileWriteYaml (dict) |
glob | Get paths from glob expression. | glob (dict) |
jsonparse | Parse json string into pypyr context. | jsonParse (dict) |
jump | Jump to another step-group. The rest of the current step-group doesn’t run. | jump (dict | str) |
now | Saves current local date-time to context now . | nowIn (str) |
nowutc | Saves current utc date-time to context nowUtc . | nowUtcIn (str) |
pathcheck | Check if paths exist on filesystem. | pathCheck (list | str) |
py | Execute inline python code. | py or pycode (str) |
pyimport | Use external libraries in your !py expressions. | pyImport (str) |
pype | Call another pipeline from the current pipeline. | pype (dict) |
pypyrversion | Write current pypyr version number to output. | |
python | Get the absolute path of the current Python executable. | |
safeshell | Deprecated alias for cmd | cmd (dict | str) |
set | Set & format context keys. | set (dict) |
shell | Run commands in the default shell. Use for pipes, wildcards, $ENVs, ~ | cmd (dict | str | list) |
shells | Run shell statements concurrently in parallel. | cmds (dict | list) |
stop | Stop pypyr entirely. | |
stoppipeline | Stop current pipeline. | |
stopstepgroup | Stop current step-group. | |
switch | Conditional branching for IF-THEN-ELSE control-of-flow. | switch (list) |
tar | Archive and/or extract tars with/without compression. Supports gzip, bzip2 & lzma. | tar (dict) |
venv | Create a virtual environment (venv). | venv (str | dict | list) |