NebulaGraph Python¶
NebulaGraph Python is a Python client for connecting to and managing the NebulaGraph database.
Prerequisites¶
You have installed Python 3.6 or later versions.
Compatibility with NebulaGraph¶
See github.
Install NebulaGraph Python¶
Install NebulaGraph Python with pip¶
$ pip install nebula3-python==<version>
Install NebulaGraph Python from the source code¶
-
Clone the NebulaGraph Python source code to the host.
-
(Recommended) To install a specific version of NebulaGraph Python, use the Git option
--branch
to specify the branch. For example, to install v3.4.0, run the following command:$ git clone --branch release-3.4 https://github.com/vesoft-inc/nebula-python.git
-
To install the daily development version, run the following command to download the source code from the
master
branch:$ git clone https://github.com/vesoft-inc/nebula-python.git
-
-
Change the working directory to nebula-python.
$ cd nebula-python
-
Run the following command to install NebulaGraph Python.
$ pip install .
API reference¶
Click here to check the classes and functions provided by the Python Client.
Core of the example code¶
NebulaGraph Python clients provides Connection Pool and Session Pool methods to connect to NebulaGraph. Using the Connection Pool method requires users to manage sessions by themselves.
-
Session Pool
For details about all the code, see SessionPoolExample.py.
For limitations of using the Session Pool method, see Example of using session pool.
-
Connection Pool
For details about all the code, see Example.