qbraid.LazyLoader
- class LazyLoader(module_name, parent_globals)[source]
Lazily loads a module upon attribute access.
This class acts as a proxy for a module, loading it only when an attribute of the module is accessed for the first time.
- module_name
The full qualified name of the module to be lazily loaded.
- Type:
str
- parent_globals
The globals of the parent module, where this loader is used.
- Type:
dict
- module
The loaded module. Initially set to None.
- Type:
module, optional
- Parameters:
module_name (str) – The full qualified name of the module to be lazily loaded.
parent_globals (dict) – The globals of the parent module.
Methods
__init__
(module_name, parent_globals)