Nebula Python

    已安装Python,版本为3.5及以上。

    1. 克隆Nebula Python源码到机器。

      • (推荐)如果需要安装指定版本的Nebula Python,请使用选项指定分支。例如安装v2.6.0发布版本,请执行如下命令:

        1. $ git clone --branch v2.6.0 https://github.com/vesoft-inc/nebula-python.git
    2. 执行如下命令安装依赖。

      Note

    3. 执行如下命令安装。

      1. $ sudo python3 setup.py install

    详细示例请参见Example

    1. # 设置所有Meta服务地址
    2. meta_cache = MetaCache([('192.168.xx.1', 9559),
    3. ('192.168.xx.2', 9559),
    4. 50000)
    5. graph_storage_client = GraphStorageClient(meta_cache)
    6. resp = graph_storage_client.scan_vertex(
    7. tag_name='person')
    8. while resp.has_next():
    9. result = resp.next()
    10. print(vertex_data)
    11. resp = graph_storage_client.scan_edge(
    12. space_name='ScanSpace',
    13. edge_name='friend')
    14. while resp.has_next():
    15. result = resp.next()
    16. for edge_data in result: