dmlcloud.import_object
- dmlcloud.import_object(object_path)
Imports an object from a module.
The object path should be in the form of “module.submodule.object”. The function imports the module and returns the object.
- Parameters:
object_path (str) – The path to the object to import.
- Returns:
The imported object.
- Return type:
Any
- Raises:
ImportError – If the module containing the object cannot be imported or the object cannot be found.
Example
>>> import_object("dmlcloud.core.stage.Stage") <class 'dmlcloud.core.stage.Stage'>