"""Application config package.

`config` (config.ini + optional watchdog) is loaded lazily so imports like
`ws_package.configs.security` do not start an inotify observer.
"""

_config = None


def __getattr__(name: str):
    global _config
    if name == "config":
        if _config is None:
            from .handler import config as _cfg
            _config = _cfg
        return _config
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
