class documentation

Module that can act both as a lazy-loader and as a proxy.

Notes

We do NOT register this module with sys.modules so as not to cause confusion in the global environment. This way we have a valid proxy module for our own use, but it lives exclusively within polars.

Method __getattr__ Undocumented
Method __init__ Initialise lazy-loading proxy module.
Class Variable __lazy__ Undocumented
Method _import Undocumented
Class Variable _mod_pfx Undocumented
Instance Variable _globals Undocumented
Instance Variable _module_available Undocumented
Instance Variable _module_name Undocumented
def __getattr__(self, name: str) -> Any: (source)

Undocumented

def __init__(self, module_name: str, *, module_available: bool): (source)

Initialise lazy-loading proxy module.

Parameters

module_name : str
the name of the module to lazy-load (if available).
module_available : bool
indicate if the referenced module is actually available (we will proxy it in both cases, but raise a helpful error when invoked if it doesn't exist).
__lazy__: bool = (source)

Undocumented

def _import(self) -> ModuleType: (source)

Undocumented

Undocumented

_globals = (source)

Undocumented

_module_available = (source)

Undocumented

_module_name = (source)

Undocumented