built-in steps permalink

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.

titledescriptioninput context
addAdd item to a set.add (dict)
appendAppend item to a list.append (dict)
assertStop pipeline if item in context is not as expected.assert (dict)
callCall another step-group. Continue from the same place after the called groups complete.call (dict | str)
cmdRun any external program, command, script.cmd (dict | str | list)
cmdsRun external programs, commands & scripts concurrently in parallel.cmds (dict | list)
configvarsInject variables from config into pipeline.
contextclearRemove specified items from context.contextClear (list)
contextclearallWipe the entire context.
contextcopyCopy entire context keys.contextCopy (dict)
contextmergeMerges values into context, preserving the existing context hierarchy.contextMerge (dict)
contextsetfOld name for set. Use set instead.contextSetf (dict)
debugPretty print context to output.debug (dict)
defaultSet values if they do not exist already.defaults (dict)
echoEcho context value of echoMe to the output.echoMe (any)
envGet, set or unset $ENVs.env (dict)
envgetGet $ENVs & use a default fallback if they don’t exist.envget (list)
fetchjsonLoad json file into pypyr context.fetchJson (dict)
fetchtomlLoad toml file into pypyr context.fetchToml (dict)
fetchyamlLoad yaml file into pypyr context.fetchYaml (dict)
fileformatFind & replace substitution {tokens} in any file.fileFormat (dict)
fileformatjsonFind & replace substitution {tokens} in a json file.fileFormatJson (dict)
fileformattomlFind & replace substitution {tokens} in a toml file.fileFormatToml (dict)
fileformatyamlFind & replace substitution {tokens} in a yaml file.fileFormatYaml (dict)
filereadRead file into pypyr context.fileRead (dict)
filereplaceFind & replace any arbitrary search strings in a file.fileReplace (dict)
filewriteWrite payload to file.fileWrite (dict)
filewritejsonWrite payload to file in json format.fileWriteJson (dict)
filewritetomlWrite payload to file in toml format.fileWriteToml (dict)
filewriteyamlWrite payload to file in yaml format.fileWriteYaml (dict)
globGet paths from glob expression.glob (dict)
jsonparseParse json string into pypyr context.jsonParse (dict)
jumpJump to another step-group. The rest of the current step-group doesn’t run.jump (dict | str)
nowSaves current local date-time to context now.nowIn (str)
nowutcSaves current utc date-time to context nowUtc.nowUtcIn (str)
pathcheckCheck if paths exist on filesystem.pathCheck (list | str)
pyExecute inline python code.py or pycode (str)
pyimportUse external libraries in your !py expressions.pyImport (str)
pypeCall another pipeline from the current pipeline.pype (dict)
pypyrversionWrite current pypyr version number to output.
pythonGet the absolute path of the current Python executable.
safeshellDeprecated alias for cmdcmd (dict | str)
setSet & format context keys.set (dict)
shellRun commands in the default shell. Use for pipes, wildcards, $ENVs, ~cmd (dict | str | list)
shellsRun shell statements concurrently in parallel.cmds (dict | list)
stopStop pypyr entirely.
stoppipelineStop current pipeline.
stopstepgroupStop current step-group.
switchConditional branching for IF-THEN-ELSE control-of-flow.switch (list)
tarArchive and/or extract tars with/without compression. Supports gzip, bzip2 & lzma.tar (dict)
venvCreate a virtual environment (venv).venv (str | dict | list)
last updated on .