pyiron_contrib.protocol.utils.misc module
- class pyiron_contrib.protocol.utils.misc.LoggerMixin[source]
Bases:
object
A class which is meant to be inherited from. Provides a logger attribute. The loggers name is the fully qualified type name of the instance
- fullname()[source]
Returns the fully qualified type name of the instance
- Returns
fully qualified type name of the instance
- Return type
str
- property logger
- pyiron_contrib.protocol.utils.misc.ensure_iterable(v)
- pyiron_contrib.protocol.utils.misc.flatten(l)
- pyiron_contrib.protocol.utils.misc.fullname(obj)[source]
Returns the fully qualified class name of an object
- Parameters
obj – (object) the object
Returns: (str) the class name
- pyiron_contrib.protocol.utils.misc.is_iterable(o)[source]
Convenience method to test for an iterator
- Parameters
o – the object to test
- Returns
wether the input argument is iterable or not
- Return type
bool
- pyiron_contrib.protocol.utils.misc.ordered_dict_get_index(ordered_dict, index)[source]
Gets the object at “index” of an collections.OrderedDict without copying the keys list :param ordered_dict: (collections.OrderedDict) the dict to get the value from :param index: (int) the index
Returns: (object) the object at “index”