Package pygeodesy :: Module lazily |
[frames] | no frames]

# Module lazily

Lazily import `pygeodesy` modules and attributes.

Lazy import is supported only for Python 3.7+ and is enabled by default in PyGeodesy 18.11.10+.

To disable lazy import set environment variable `PYGEODESY_LAZY_IMPORT` to `0` or an empty string. Use `2` or higher to print a message for each lazily imported module and attribute, similar to environment variable `PYTHONVERBOSE` showing all imports.

Lazy import only applies to top-level modules of `pygeodesy`. A lazy import of a top-level module also loads all sub-modules imported by that top-level module.

Based on modutil.lazy_import by Brett Cannon's modutil.

Version: 19.02.10

Classes
| LazyImportError Lazy import is not supported, disabled or failed some other way.

Variables
| isLazy = `None` Lazy import setting (`int` 0, 1, 2 or 3+) from environment variable `PYGEODESY_LAZY_IMPORT`, or `None` if lazy import is not supported or not enabled, or `False` if initializing lazy import failed.