Nebula Python
已安装Python,版本为3.5及以上。
克隆Nebula Python源码到机器。
(推荐)如果需要安装指定版本的Nebula Python,请使用选项指定分支。例如安装v2.6.0发布版本,请执行如下命令:
$ git clone --branch v2.6.0 https://github.com/vesoft-inc/nebula-python.git
执行如下命令安装依赖。
Note
执行如下命令安装。
$ sudo python3 setup.py install
详细示例请参见Example。
# 设置所有Meta服务地址
meta_cache = MetaCache([('192.168.xx.1', 9559),
('192.168.xx.2', 9559),
50000)
graph_storage_client = GraphStorageClient(meta_cache)
resp = graph_storage_client.scan_vertex(
tag_name='person')
while resp.has_next():
result = resp.next()
print(vertex_data)
resp = graph_storage_client.scan_edge(
space_name='ScanSpace',
edge_name='friend')
while resp.has_next():
result = resp.next()
for edge_data in result: