Skip to content

Package structure and startup time #40

Open
@felix-andreas

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions