29 lines
685 B
Python
29 lines
685 B
Python
"""Clients module.
|
|
|
|
Routers are exposed lazily so importing ``app.modules.clients.models`` does
|
|
not initialise the clients API, UI, importer, and related modules. This keeps
|
|
the existing ``api_router`` and ``ui_router`` public exports while preventing
|
|
circular imports with client groups.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Any
|
|
|
|
__all__ = ["api_router", "ui_router"]
|
|
|
|
|
|
def __getattr__(name: str) -> Any:
|
|
if name == "api_router":
|
|
from .api import router
|
|
|
|
return router
|
|
|
|
if name == "ui_router":
|
|
from .ui import router
|
|
|
|
return router
|
|
|
|
raise AttributeError(
|
|
f"module {__name__!r} has no attribute {name!r}"
|
|
) |