MCPcopy Create free account
hub / github.com/alibaba/GraphScope / graph

Function graph

python/graphscope/gsctl/commands/interactive/glob.py:130–141  ·  view source on GitHub ↗

Create a new graph in database

(filename)

Source from the content-addressed store, hash-verified

128 help="Path of yaml file",
129)
130def graph(filename): # noqa: F811
131 """Create a new graph in database"""
132 if not is_valid_file_path(filename):
133 err(f"Invalid file: {filename}")
134 return
135 try:
136 graph = read_yaml_file(filename)
137 graph_id = create_graph(graph)
138 except Exception as e:
139 err(f"Failed to create graph: {str(e)}")
140 else:
141 succ(f"Create graph {graph['name']}(id={graph_id}) successfully.")
142
143
144@delete.command()

Calls 7

is_valid_file_pathFunction · 0.90
errFunction · 0.90
read_yaml_fileFunction · 0.90
create_graphFunction · 0.90
succFunction · 0.90
delete_graph_by_idFunction · 0.90
get_graph_id_by_nameFunction · 0.90

Tested by 1