统计分析模块更新,待测试,优化所有模块main.py文件,修复bug。

This commit is contained in:
Orangeeee
2026-09-22 22:59:50 +08:00
committed by geyuan
parent 9c9e51d68f
commit c0880f9a44
9 changed files with 30 additions and 26 deletions
+11 -10
View File
@@ -8,18 +8,19 @@ from contextlib import asynccontextmanager
Students_API = APIRouter()
Students_API.include_router(s_api)
# 自测接口
@asynccontextmanager
async def S_Fastapi(app: FastAPI):
Base.metadata.create_all(engine1)
yield
engine1.dispose()
app = FastAPI(title="学生管理系统",lifespan=S_Fastapi) # 这里必须把上面写的加上
app.include_router(s_api,tags=["students"])
if __name__ == "__main__":
# 自测接口
@asynccontextmanager
async def S_Fastapi(app: FastAPI):
Base.metadata.create_all(engine1)
yield
engine1.dispose()
app = FastAPI(title="学生管理系统", lifespan=S_Fastapi) # 这里必须把上面写的加上
app.include_router(s_api, tags=["students"])
def main():
print("Hello from student-manage-system!")