pyiron_workflow.mixin.has_interface_mixins module
For interface specification.
There are cases where we want to be able to depend on the presence of a particular attribute or method, but care very little about its details – nothing beyond, perhaps, type hints. These mixins allow us to guarantee the presence of such interfaces while leaving their actual implementation up to other classes in order to have the weakest possible coupling between different components of a composed class.
- class pyiron_workflow.mixin.has_interface_mixins.HasChannel[source]
Bases:
ABCA mix-in class for use with the
Channelclass and its children.This is useful for letting channels attempt to connect to non-channel objects directly by pointing them to some channel that object holds.
- class pyiron_workflow.mixin.has_interface_mixins.HasLabel[source]
Bases:
ABCA mixin to guarantee the label interface exists.
- property full_label: str
A more verbose label based off the underlying label attribute (and possibly other data) – in the root class, it’s just the same as the label.
- property label: str
A label for the object.