|
@@ -1,21 +1,23 @@
|
|
|
# This Python file uses the following encoding: utf-8
|
|
# This Python file uses the following encoding: utf-8
|
|
|
# @author runhey
|
|
# @author runhey
|
|
|
# github https://github.com/runhey
|
|
# github https://github.com/runhey
|
|
|
|
|
+from pathlib import Path
|
|
|
|
|
+
|
|
|
from contextlib import asynccontextmanager
|
|
from contextlib import asynccontextmanager
|
|
|
|
|
|
|
|
import argparse
|
|
import argparse
|
|
|
-from pathlib import Path
|
|
|
|
|
|
|
+from starlette import status
|
|
|
|
|
+from starlette.responses import JSONResponse
|
|
|
from fastapi import FastAPI, Request
|
|
from fastapi import FastAPI, Request
|
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
from fastapi.middleware.cors import CORSMiddleware
|
|
|
-from fastapi.staticfiles import StaticFiles
|
|
|
|
|
|
|
|
|
|
from module.logger import logger
|
|
from module.logger import logger
|
|
|
-
|
|
|
|
|
from module.server.home_router import home_app
|
|
from module.server.home_router import home_app
|
|
|
from module.server.script_router import script_app
|
|
from module.server.script_router import script_app
|
|
|
from module.server.tool_router import tool_app
|
|
from module.server.tool_router import tool_app
|
|
|
-from starlette import status
|
|
|
|
|
-from starlette.responses import JSONResponse
|
|
|
|
|
|
|
+from module.server.setting import State
|
|
|
|
|
+from module.server.main_manager import mm
|
|
|
|
|
+from starlette.staticfiles import StaticFiles
|
|
|
|
|
|
|
|
|
|
|
|
|
@asynccontextmanager
|
|
@asynccontextmanager
|