hein_control.mixin package¶
mixin classes for use across the package
hein_control.mixin.config module¶
-
class
hein_control.mixin.config.Configuration(*args, **kwargs)¶ Bases:
objectClass for storing a configuration for a function execution.
Parameters: - args – arguments
- kwargs – keyword arguments
-
args¶ arguments for the action
-
freeze¶ freezes setting or updating of args and kwargs for the instance
-
kwargs¶ keyword arguments for the action
-
update_args(*args)¶ Updates the arguments for the Action
-
update_kwargs(**kwargs)¶ updates the keyword arguments for the Action
-
hein_control.mixin.config.is_builtin_type(obj)¶ returns whether the object is a builtin type
hein_control.mixin.reg module¶
manages registry of class instances across the package
-
class
hein_control.mixin.reg.ClassProperty(f)¶ Bases:
objectDecorator for indicating a class property. Only works for getters lovingly pilfered from https://stackoverflow.com/a/5192374
Parameters: f – class function to decorate
-
class
hein_control.mixin.reg.InstanceRegistry¶ Bases:
objectA class for tracking class instances and retrieving them by UUID
-
UUID_PREFIX= ''¶
-
classmethod
class_instance_by_id(identifier: str)¶ Retrieves the instance of the current class by UUID
Parameters: identifier – unique identifier Raises: NameError – if no matching instance could be found Returns: registered class instance
-
class_registry= []¶
-
classmethod
get_instance_by_uuid(identifier: str)¶ General retrieval of any registered instance by its uuid.
Parameters: identifier – string identifier Returns: instance
-
classmethod
search_class_for_id(identifier: str, class_name: str)¶ Searches the defined class for the uuid provided
Parameters: - identifier – string identifier
- class_name – class name to search
Returns: instance
-
uuid¶ unique identifier for the instance
-
hein_control.mixin.status module¶
-
class
hein_control.mixin.status.Status¶ Bases:
hein_control.mixin.serialization.DumpableStateMixin for reporting status states and strings
-
ACTION_STATES= {-1: 'ERROR', 0: 'CONFIGURED', 1: 'PENDING', 2: 'EXECUTING', 3: 'COMPLETE'}¶
-
as_dict() → dict¶ represents the status as a dictionary
-
status¶ status string for the Action
-
status_code¶ returns a status code representative of the state of the Action
-
status_string¶ string meaning of status code
-