Skip to main content

lazy_module

This function is used to lazily import modules.

def lazy_module(
fullname: Text
) - > module

This function is used to lazily import modules. It is used in the following way: .. code-block:: python from flytekit.lazy_import import lazy_module sklearn = lazy_module("sklearn") sklearn.svm.SVC()

Parameters

NameTypeDescription
fullnameTextThe full name of the module to import

Returns

TypeDescription
moduleThe lazily loaded module, or a _LazyModule instance if the module is not found, which will raise an error upon attribute access.