diff --git a/docs/1_started.md b/docs/1_started.md index a26a45d0..d7eb7074 100644 --- a/docs/1_started.md +++ b/docs/1_started.md @@ -10,7 +10,7 @@ pip install nebula5_python==5.2.0 from source ```bash -git clone -b https://github.com/vesoft-inc/nebula-python.git +git clone -b dev https://github.com/vesoft-inc/nebula-python.git cd nebula-python pip install -e . ``` @@ -127,6 +127,23 @@ with NebulaClient( If you prefer manual lifecycle control, you can explicitly open and close clients. +- Sync version: + +```python +from nebulagraph_python import NebulaClient + +client = NebulaClient( + hosts=["127.0.0.1:9669"], + username="root", + password="NebulaGraph01", +) +try: + result = client.execute("RETURN 1 AS a, 2 AS b") + result.print() +finally: + client.close() +``` + - Async version: ```python