You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2021/03/25 09:07:46 UTC
[iotdb] branch NewDoc updated: update user doc for py-client (#2907)
This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch NewDoc
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/NewDoc by this push:
new 6e7242a update user doc for py-client (#2907)
6e7242a is described below
commit 6e7242a45e1012157dffc9d3f1383686020e8c12
Author: Steve Yurong Su <st...@outlook.com>
AuthorDate: Thu Mar 25 17:07:18 2021 +0800
update user doc for py-client (#2907)
---
.../UserGuide/Client/Programming - Other Languages.md | 19 +++++--------------
.../UserGuide/Client/Programming - Other Languages.md | 13 ++++---------
2 files changed, 9 insertions(+), 23 deletions(-)
diff --git a/docs/UserGuide/Client/Programming - Other Languages.md b/docs/UserGuide/Client/Programming - Other Languages.md
index cfd596d..cb9be59 100644
--- a/docs/UserGuide/Client/Programming - Other Languages.md
+++ b/docs/UserGuide/Client/Programming - Other Languages.md
@@ -51,22 +51,13 @@ The download command is:
pip install apache-iotdb
```
-#### Option 2: use the compile script we provided
+#### Option 2: basic usage of thrift
-If you have added Thrift executable into your path, you may just run `client-py/compile.sh` or
- `client-py\compile.bat`, otherwise, modify it to set variable `THRIFT_EXE` to point to
-your executable. This will generate thrift sources under folder `target`, you can add it to your
-`PYTHONPATH` so that you will be able to use the library in your code. Note that the scripts
-locate the thrift source file by relative path, so if you move the scripts else where, they are
-no longer valid.
-
-#### Option 3: basic usage of thrift
-
-Optionally, if you know the basic usage of thrift, download the thrift source file in
-`thrift\src\main\thrift\rpc.thrift`, and simply use `thrift -gen py -out ./target/iotdb rpc.thrift`
-to generate the python library.
+Optionally, if you know the basic usage of thrift, you can download the thrift source file in
+`thrift\src\main\thrift\rpc.thrift`, and simply run `thrift -gen py -out ./target/iotdb rpc.thrift`
+to generate the Python library.
### 4. Use Example
We provided an example of how to use the thrift library to connect to IoTDB in `client-py/src
-/client_example.py`, please read it carefully before you write your own code.
+/SessionExample.py`, please read it carefully before you write your own code.
diff --git a/docs/zh/UserGuide/Client/Programming - Other Languages.md b/docs/zh/UserGuide/Client/Programming - Other Languages.md
index 0002375..532bce0 100644
--- a/docs/zh/UserGuide/Client/Programming - Other Languages.md
+++ b/docs/zh/UserGuide/Client/Programming - Other Languages.md
@@ -46,19 +46,14 @@ http://thrift.apache.org/docs/install/
pip install apache-iotdb
```
- * 方案2: 使用我们提供的编译脚本
+ * 方案2:thrift的基本用法
-如果你在路径中添加了Thrift可执行文件,则可以运行`client-py/compile.sh`或
- `client-py \ compile.bat`,或者你必须对其进行修改以将变量`THRIFT_EXE`设置为指向你的可执行文件。 这将在`target`文件夹下生成节俭源,你可以将其添加到你的`PYTHONPATH`,以便你可以在代码中使用该库。 请注意,脚本通过相对路径找到节俭的源文件,因此,如果将脚本移动到其他位置,它们将不再有效。
-
- * 方案3:thrift的基本用法
-
-或者,如果您了解thrift的基本用法,则只能在以下位置下载Thrift源文件:
-`thrift\src\main\thrift\rpc.thrift`,并且只需使用`thrift -gen py -out ./target/iotdb rpc.thrift`生成python库。
+或者,如果您了解thrift的基本用法,则可以在以下位置查看thrift源文件:
+`thrift\src\main\thrift\rpc.thrift`,使用`thrift -gen py -out ./target/iotdb rpc.thrift`生成Python库。
### 示例代码
-我们在`client-py/src/client_example.py`中提供了一个示例,说明如何使用Thrift库连接到IoTDB,请先仔细阅读,然后再编写自己的代码。
+我们在`client-py/src/SessionExample.py`中提供了一个示例,说明如何使用Thrift库连接到IoTDB,请先仔细阅读,然后再编写自己的代码。
## C++ 原生接口