deepness.common.lazy_package_loader.LazyPackageLoader¶
- class LazyPackageLoader(package_name)¶
Bases:
objectAllows to wrap python package into a lazy version, so that the package will be loaded once it is actually used
- Usage:
cv2 = LazyPackageLoader(‘cv2’) # This will not import cv2 yet … cv2.waitKey(3) # here will be the actual import
Methods