Add fastapi getelementproperties

This commit is contained in:
DingZQ
2025-02-05 22:24:28 +08:00
parent c51b8524b0
commit 5e8d738a27
2 changed files with 14 additions and 0 deletions

View File

@@ -429,6 +429,11 @@ async def fast_get_node_properties(network: str, node: str) -> dict[str, Any]:
async def fast_get_link_properties(network: str, link: str) -> dict[str, Any]:
return get_link_properties(network, link)
# type can be 'node' or 'link'
@app.get('/getelementproperties/')
async def fast_get_element_properties(network: str, type: str, element: str) -> dict[str, Any]:
return get_element_properties(network, type, element)
############################################################
# title 1.[TITLE]
############################################################