Add fastapi

This commit is contained in:
DingZQ
2025-04-17 20:54:16 +08:00
parent 72a4e8427d
commit 6bb3c1c22b
2 changed files with 8 additions and 0 deletions

View File

@@ -2199,6 +2199,12 @@ async def fastapi_get_all_schemes(network: str) -> list[dict[Any, Any]]:
return get_all_schemes(network)
############################################################
# pipe_risk_probability 41
############################################################
@app.get('/getpiperiskprobabilitynow/')
async def fastapi_get_pipe_risk_probability_now(network: str, pipe_id: str) -> dict[str, float]:
return get_pipe_risk_probability_now(network, pipe_id)