Skip to content

pysparky_pipeline.node

Immutable metadata for a function registered in a dependency graph.

Classes

NameDescription
NodeA callable and its resolved function-parameter metadata.

Nodeclassdataclass#

class Node(name: str, function: Callable[..., object], parameters: tuple[str, ...], dependencies: tuple[str, ...], external_inputs: tuple[str, ...], required_inputs: tuple[str, ...], optional_inputs: tuple[str, ...], defaulted_parameters: tuple[str, ...])

A callable and its resolved function-parameter metadata.

The node metadata is immutable. The callable itself remains the original caller-owned object and is never invoked during graph construction.

defaulted_parametersattributeinstance attribute#

defaulted_parameters: tuple[str, ...]

dependenciesattributeinstance attribute#

dependencies: tuple[str, ...]

external_inputsattributeinstance attribute#

external_inputs: tuple[str, ...]

functionattributeclass attributeinstance attribute#

function: Callable[..., object] = field(repr=False, compare=False)

nameattributeinstance attribute#

name: str

optional_inputsattributeinstance attribute#

optional_inputs: tuple[str, ...]

parametersattributeinstance attribute#

parameters: tuple[str, ...]

required_inputsattributeinstance attribute#

required_inputs: tuple[str, ...]

from_functionmethodclassmethod#

def from_function(function: Callable[..., object], registered_names: Collection[str]) -> Node

Inspect a callable and split parameters into dependencies/inputs.