Add base api

This commit is contained in:
wqy
2022-09-01 22:03:09 +08:00
parent 5ac03bb9bf
commit a177edbfcb
4 changed files with 116 additions and 0 deletions

14
api/test.py Normal file
View File

@@ -0,0 +1,14 @@
from _project import *
from _0_base import *
open_project("net")
add_node("net", "n-1", JUNCTION)
if have_node("net", "n-1"):
delete_node("net", "n-1")
print(have_node("net", "n-1"))
open_project("net")
add_link("net", "l-1", PIPE)
if have_link("net", "l-1"):
delete_link("net", "l-1")
print(have_link("net", "l-1"))