Add fastapi fastapi_run_project_return_dict to return the text version of simulation results

This commit is contained in:
DingZQ
2025-02-05 15:06:00 +08:00
parent 1996ffd17d
commit 5f9b5bd310
4 changed files with 65 additions and 4 deletions

View File

@@ -211,6 +211,11 @@ def import_inp(name: str, cs: ChangeSet, version: str = '3') -> bool:
def export_inp(name: str, version: str = '3') -> ChangeSet:
return api.export_inp(name, version)
#DingZQ, 2025-02-04, 返回dict[str, Any]
def run_project_return_dict(name: str) -> dict[str, Any]:
return epanet.run_project_return_dict(name)
# original code
def run_project(name: str) -> str:
return epanet.run_project(name)