Open
Description
Currently every public object is exposed via the top-level __init__.py
. This effects the startup time when importing latticejson as library but also the startup time of the CLI (because it is a submodule and the parent package gets always executed). Maybe it would be better to use the scipy-approach: Keep the Top-level __init__.py
empty and use subpackages to import functionality. But this would be somewhat inconvenient for a user...
To solve the issue for the CLI, the cli.py
could be installed separately.
Maybe the __getattr__
of PEP 562 can be used to lazy load the submodules into the top-level name space of the __init__.py
.
See also:
Metadata
Assignees
Labels
No labels