pyiron_base.utils.instance module
Utility functions used in pyiron. In order to be accessible from anywhere in pyiron, they must remain free of any imports from pyiron!
- pyiron_base.utils.instance.import_class(class_type)
- pyiron_base.utils.instance.static_isinstance(obj, obj_type)
A static implementation of isinstance() - instead of comparing an object and a class, the object is compared to a string, like ‘pyiron_base.jobs.job.generic.GenericJob’ or a list of strings.
- Parameters:
obj – the object to check
obj_type (str/list) – object type as string or a list of object types as string.
- Returns:
[True/False]
- Return type:
bool