pyiron_workflow.io module
Collections of channel objects.
These also support the syntactic sugar of treating value assignments and new connections on the same footing.
- class pyiron_workflow.io.DataIO(*channels: OwnedType)[source]
Bases:
IO[DataChannel,DataChannel],ABC- property ready: bool
- class pyiron_workflow.io.IO(*channels: OwnedType)[source]
Bases:
HasStateDisplay,Generic[OwnedType,OwnedConjugate],ABCIO is a convenience layer for holding and accessing multiple input/output channels. It allows key and dot-based access to the underlying channels. Channels can also be iterated over, and there are a number of helper functions to alter the properties of or check the status of all the channels at once.
A new channel can be assigned as an attribute of an IO collection, as long as it matches the channel’s type (e.g.
OutputChannelforOutputs,InputChannelforInputs, etc…).When assigning something to an attribute holding an existing channel, if the assigned object is a
Channel, then an attempt is made to make aconnectionbetween the two channels, otherwise we fall back on a value assignment that must be defined in child classes under _assign_value_to_existing_channel. This provides syntactic sugar such that both new connections and new values can be assigned with a simple =.- channel_dict: DotDict[str, OwnedType]
- property connected: bool
- property connections: list[OwnedConjugate]
All the unique connections across all channels
- disconnect() list[tuple[OwnedType, OwnedConjugate]][source]
Disconnect all connections that owned channels have.
- display_state(state: dict[str, Any] | None = None, ignore_private: bool = True) dict[str, Any][source]
A dictionary of JSON-compatible objects based on the object state (plus whatever modifications to the state the class designer has chosen to make).
Anything that fails to dump to JSON gets cast as a string and then dumped.
- Parameters:
state (dict|None) – The starting state. Default is None which uses __getstate__, but available in case child classes want to first sanitize the state values.
ignore_private (bool) – Whether to ignore or include any state element whose key starts with ‘_’. Default is True, only show public data.
- Return type:
dict
- property fully_connected: bool
- property labels: list[str]
- class pyiron_workflow.io.InputSignals(*channels: OwnedType)[source]
-
- disconnect_run() list[tuple[InputSignal, OutputSignal]][source]
Disconnect all run and accumulate_and_run signals, if they exist.
- class pyiron_workflow.io.InputsIO(*channels: OwnedType)[source]
Bases:
IO[InputType,OutputType],ABC
- class pyiron_workflow.io.Outputs(*channels: OwnedType)[source]
Bases:
GenericOutputs[OutputData]
- class pyiron_workflow.io.OutputsIO(*channels: OwnedType)[source]
Bases:
IO[OutputType,InputType],ABC
- class pyiron_workflow.io.SignalIO(*channels: OwnedType)[source]
Bases:
IO[SignalChannel,SignalChannel],ABC
- class pyiron_workflow.io.Signals[source]
Bases:
HasStateDisplayA meta-container for input and output signal IO containers.
- input
An empty input signals IO container.
- Type:
- output
An empty input signals IO container.
- Type:
- property connected: bool
- disconnect() list[tuple[SignalChannel, SignalChannel]][source]
Disconnect all connections in input and output signals.
- disconnect_run() list[tuple[InputSignal, OutputSignal]][source]
- property fully_connected: bool