跳到主要内容
版本:3.11.0

NebulaGraph Python

NebulaGraph Python 是一款 Python 语言的客户端,可以连接、管理 悦数图数据库 图数据库。

前提条件

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

版本对照表

参见Github

安装 NebulaGraph Python

pip 安装

$ pip install nebula3-python==<version>

克隆源码安装

  1. 克隆 NebulaGraph Python 源码到机器。
  • (推荐)如果需要安装指定版本的 NebulaGraph Python,请使用选项--branch指定分支。例如安装 v3.8.0发布版本,请执行如下命令:

    $ git clone --branch release-3.8 https://github.com/vesoft-inc/nebula-python.git
  • 如果需要安装日常开发版本,请执行如下命令下载master分支的源码:

    $ git clone https://github.com/vesoft-inc/nebula-python.git
  1. 进入目录 nebula-python。
$ cd nebula-python
  1. 执行如下命令安装。
$ pip install .

API 文档

点击此处查看 Python 客户端提供的各种类和方法。

核心代码

NebulaGraph Python 客户端提供 Connection Pool 和 Session Pool 两种使用方式,使用 Connection Pool 需要用户自行管理 Session 实例。