nodify.Workflow
- class nodify.Workflow(*args, **kwargs)[source]
Base class for workflows.
When a subclass of Workflow is created, the function from which is created is transformed into a workflow.
The difference between a workflow and a node is that a workflow has its computation split into smaller parts.
Examples
Let’s say you have a function
some_function
. You can create a workflow from it like:>>> from nodify import Workflow >>> Workflow.from_func(some_function)
- __init__(*args, **kwargs)
Methods
__init__
(*args, **kwargs)evaluate_input_node
(node)final_node_key
(*args)Returns the key of the final (output) node of the workflow.
find_node_key
(node, *args)Returns the identifier key of a node in this workflow
from_func
([func, context, module])Builds a node from a function.
from_node_tree
(output_node[, workflow_name])Creates a workflow class from a node.
get
()Returns the up to date output of the workflow.
get_diagram_label
()Returns the label to be used in diagrams when displaying this node.
get_input
(key)get_tree
()is_output_outdated
(evaluated_inputs)Checks if the node needs to be ran
map_inputs
(inputs, func[, only_nodes, exclude])Maps all inputs of the node applying a given function.
recursive_update_inputs
([cls])Updates the inputs of the node recursively.
setup
(*args, **kwargs)Sets up the node based on its initial inputs.
update_inputs
(**inputs)Updates the inputs of the workflow.
Attributes
DELETE_KWARG
context
default_inputs
get_syntax
inputs
last_log
Last time the logs of this node were updated
network
dryrun_nodes
nodes
logs
function