runtime module

Code used while a graph is running.

w(string, quote_type=0)[source]

Wraps given string in quotes.

Parameters:
  • string (str) – Input string to be wrapped
  • quote_type (int or str) – Int 1: ‘, 2: “, 3: ‘’’, 4: “”” Default is 1, any string can also be provided and we will wrap the string arg in that string ie w(‘Hello World’, ‘$’) returns ‘$Hello World$’.
Returns:

String wrapped in quote marks or custom string

execute(paths=(), start=None, parameters=None)[source]

While within node code, this method runs other parts of the graph, allowing non-linear execution.

Parameters:
  • paths (iterable, optional) – iterable of paths to execute, defaults to ()
  • start (str, optional) – node path to start from, defaults to None. NOTE must give either paths or start, both is invalid input.
  • parameters (dict, optional) – parameters dictionary to apply before exectuion, defaults to None
Raises:
  • GraphError – When there is a problem with execution.
  • ValueError – When not given either node paths or a start path.