Files
DoubaoTeam/main.py
T

32 lines
993 B
Python
Raw Normal View History

2026-09-20 17:06:24 +08:00
from fastapi import FastAPI
from api.example import example_router
2026-09-20 19:45:36 +08:00
from middleware import log_middleware
2026-09-22 09:17:20 +08:00
from api.statistics import statistics_router
2026-09-20 17:06:24 +08:00
import uvicorn
from api.student import student_router
2026-09-20 17:06:24 +08:00
app = FastAPI()
2026-09-20 19:45:36 +08:00
app.middleware("http")(log_middleware)
#-------------朱婷婷--------------
2026-09-21 14:17:09 +08:00
from api.class_api import classes_router
app.include_router(classes_router,tags=['班级接口'],prefix="/classes")
2026-09-20 19:45:36 +08:00
#-------------李玉杰--------------
2026-09-21 17:53:12 +08:00
app.include_router(student_router,tags=['学生接口'],prefix="/students")
2026-09-20 19:45:36 +08:00
#-------------张义---------------
#-------------薄鑫---------------
2026-09-21 17:01:33 +08:00
from api import consultant
app.include_router(consultant.router)
2026-09-20 17:06:24 +08:00
#-------------张昕浩---------------
2026-09-22 09:17:20 +08:00
app.include_router(example_router)
app.include_router(statistics_router, prefix="/statistics")
2026-09-20 17:06:24 +08:00
2026-09-20 19:45:36 +08:00
#-------------曾凯---------------
2026-09-20 17:06:24 +08:00
2026-09-20 19:45:36 +08:00
#-------------南方宇---------------
2026-09-20 17:06:24 +08:00
#-----------主程序----------------
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=23333)