Skip to content

system

None

Hooks

Type Description Return
listdir Hook for listdir. Lists the contents of a directory.:return: A list of contents of the path if input is string, A map with keys of items if input path is list.
keys Hook for returning the keys of a dict as a list.:param src: The input dict or list of dicts return the keys for:return: List of keys or list of list of keys if input is list
merge Hook for recursively merging dict objects with input maps.:param src: The input dict to update:param input: A dict or list of dicts to update the input dict:return: An updated dict object.
pop Hook for recursively merging dict objects with input maps.:param src: The input dict to update:param item: A list or string of items to remove from a dictionary or list:return: An updated dict object.
update Hook for updating dict objects with items.
pprint Wraps python pprint builtin.https://docs.python.org/3/library/pprint.html#pprint.PrettyPrinter
print Hook for printing an input and returning the output.Follows: https://docs.python.org/3/library/functions.html#printprint(*objects, sep=' ', end='\n', file=sys.stdout, flush=False)
random_hex Hook for random_hex. Lists the contents of a directory.
random_string Hook for random_string. Lists the contents of a directory.
find_in_child Hook to find the absolute path to a file or directory in child directories.:return: string: Absolute path to the target file
find_in_parent Hook to find the absolute path to a file or directory in parent directories.:return: string: Absolute path to the target file
path_exists Hook for os package 'path.exists'.
isdir Hook for os package 'path.isdir'.
isfile Hook for os package 'path.isfile'.
path_join Hook joining paths.
mkdir Hook creating a directory.
jinja Hook for jinja templates. Returns string path to the output file.
concat Hook to concatenate a list of items.:param inputs: A list append to:param item: A list or string to append to input list:return: An appended list object.
append Hook for updating dict objects with items.
list_from_dict Hook generating a list from a dict based on the keys.:param input: A list append to:param item: A list or string to append to input list:return: An appended list object.
list_remove Hook for updating dict objects with items.:param input: A list append to:param item: A list or string to remove to input list:param filter: A regex to remove items from list with:return: A list without removed objects objects.
unzipfile Hook to unzip a file.
zipfile Hook to zip a file or directory.
yaml Hook for yaml.
chmod Hook removing a file or directory.:param src: String or list of sources, either directories or files:param dst: String for path to copy to:param create_path: Boolean to create the directory path if it does not exist. Defaults to true:return: None
copy Hook coying a file/files or directory/directories to a location.:param src: String or list of sources, either a directories or files:param dst: String for path to copy to:param create_path: Boolean to create the directory path if it does not exist. Defaults to true:return: None
create_file Hook to create an empty file - like touch.:param path: String or list of paths to create.
file Hook to read and write to a file.
move Hook for moving a directory or directories to a location.:param src: String or list of sources, either directories or files:param dst: String for path to copy to:param create_path: Boolean to create the directory path if it does not exist. Defaults to true:return: None
remove Hook for removing a directory or directories.:param path: String or list of paths to remove:return: None
shred Hook for shredding file/files.:param src: String or list of sources, either directories or files:param dst: String for path to copy to:param create_path: Boolean to create the directory path if it does not exist. Defaults to true:return: None
command System calls.
shell shell hook for system calls.Streams the output of the process.:param command: The command to run on the host:return: String output of command
set_env Hook for setting environment variables.
export Hook for setting environment variables that returns NoneSets with input dict. Gets with input string.:param input: Dict for setting and string for getting environment variables:param fallback: A fallback for getting.:return: input
get_env Hook for getting environment variables.
unset Hook for unsetting environment variables.
json Hook for json. If no contents is provided, the hook reads from path. Otherwise it writes the contents. When writing, returns path. When reading, returns dict.
join Join a list of strings with a separator.
split Hook for splitting a string into as list based on a separator.
webbrowser Hook for registering a variable based on an input. Useful with rendering.
symlink Hook creating symlinks wrapping os.symlink functionality.