INNER CODE UNIT · Python
_build_app
TianGzlab/OmicsClaw · omicsclaw/memory/server.py:57
def _build_app():
"""Build and configure the FastAPI application."""
if not _HAS_FASTAPI:
return None
@asynccontextmanager
async def lifespan(app):
from . import get_db_manager, get_memory_engine
from .bootstrap import seed_knowhows
db = get_db_manager()
await db.init_db()
await seed_knowhows(get_memory_engine())
yield
from . import close_db
await close_db()
app = FastAPI(