LazyModule

Inheritance diagram of LazyModule
class LazyModule(name, package, entry_point)[source]

It provides a ModuleType object that acts as a placeholder for modules registered via entry-points. It replaces the actual module without actually importing it until a member of the module is requested, which automatically triggers the load of the entry-point and the substitution of this placeholder by the actual module

Import from taurus.core.util.lazymodule as:

from taurus.core.util.lazymodule import LazyModule
static import_ep(name, package, entry_point)[source]

Lazily imports a module defined in an entry point. The LazyModule is inserted in sys.modules as <package>.<name>

Parameters:
  • name – name of the module

  • package – name of the package to which the module belongs

  • entry_point – entry-point for a module

Returns:

A LazyModule object