List Graph
from ultipa import Connection
from ultipa import UltipaConfig
defaultConfig = UltipaConfig()
conn = Connection.GetConnection(hosts=["host:port"],username="root",
password="root",defaultConfig=defaultConfig)
ret = conn.listGraph()
print(ret.toJSON())
Create Graph
from ultipa import Connection
from ultipa import UltipaConfig,ULTIPA_REQUEST
defaultConfig = UltipaConfig()
conn = Connection.GetConnection(hosts=["host:port"],username="root",
password="root",defaultConfig=defaultConfig)
ret = conn.createGraph(ULTIPA_REQUEST.Graph(graph="test"))
print(ret.toJSON())
Drop Graph
from ultipa import Connection
from ultipa import UltipaConfig,ULTIPA_REQUEST
defaultConfig = UltipaConfig()
conn = Connection.GetConnection(hosts=["host:port"],username="root",
password="root",defaultConfig=defaultConfig)
ret = conn.dropGraph(ULTIPA_REQUEST.Graph('pytest_test'))
print(ret.toJSON(pretty=True))