"""
The RelationalAI Python SDK, also known as PyRel.
"""

import importlib.metadata

__version__ = importlib.metadata.version(__package__ or __name__)

__all__ = ["semantics", "config", "__version__"]  # type: ignore[reportUnsupportedDunderAll]

def __getattr__(name):
    """Lazy import submodules to avoid eager loading and side effects."""
    if name in ("semantics", "config"):
        import importlib
        module = importlib.import_module(f".{name}", __name__)
        globals()[name] = module  # Cache for future access
        return module
    raise AttributeError(f"module {__name__!r} has no attribute {name!r}")

def __dir__():
    """Include lazy-loaded submodules in dir() output for discoverability."""
    return list(__all__) + list(globals().keys())
