""" server/__init__.py ================== Makes `server` a package while still exposing the FastAPI `app` defined in the root-level server.py. We use importlib to load server.py by absolute path, avoiding the circular-name clash that would occur with a plain `import server`. """ import importlib.util import os _root = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) _spec = importlib.util.spec_from_file_location( "_server_root", os.path.join(_root, "server.py"), ) _mod = importlib.util.module_from_spec(_spec) _spec.loader.exec_module(_mod) app = _mod.app # re-export for `from server import app`