From be3438e768c709cc33c126131867170047603d61 Mon Sep 17 00:00:00 2001 From: xiangmy21 <2248278431@qq.com> Date: Fri, 28 Mar 2025 19:09:32 +0800 Subject: [PATCH] fix: code type error in python API docs --- .../Table/API/Programming-Python-Native-API.md | 8 ++++---- .../API/Programming-Python-Native-API.md | 8 ++++---- .../Table/API/Programming-Python-Native-API.md | 12 ++++++------ .../API/Programming-Python-Native-API.md | 12 ++++++------ 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/UserGuide/Master/Table/API/Programming-Python-Native-API.md b/src/UserGuide/Master/Table/API/Programming-Python-Native-API.md index 990cf898..938abf71 100644 --- a/src/UserGuide/Master/Table/API/Programming-Python-Native-API.md +++ b/src/UserGuide/Master/Table/API/Programming-Python-Native-API.md @@ -26,7 +26,7 @@ IoTDB provides a Python native client driver and a session pool management mecha To use the IoTDB Python API, install the required package using pip: -```Java +```sh pip3 install apache-iotdb==2.0.1b0 ``` @@ -175,7 +175,7 @@ class TableSessionConfig(object): #### Sample Code -```Java +```python def get_session(self) -> TableSession: """ Retrieve a new TableSession instance. @@ -223,7 +223,7 @@ def close(self): #### Sample Code -```Java +```python class TableSessionPoolConfig(object): """ Configuration class for a TableSessionPool. @@ -285,7 +285,7 @@ class TableSessionPoolConfig(object): Here is an excerpt of the sample code: -```Java +```python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information diff --git a/src/UserGuide/latest-Table/API/Programming-Python-Native-API.md b/src/UserGuide/latest-Table/API/Programming-Python-Native-API.md index 990cf898..938abf71 100644 --- a/src/UserGuide/latest-Table/API/Programming-Python-Native-API.md +++ b/src/UserGuide/latest-Table/API/Programming-Python-Native-API.md @@ -26,7 +26,7 @@ IoTDB provides a Python native client driver and a session pool management mecha To use the IoTDB Python API, install the required package using pip: -```Java +```sh pip3 install apache-iotdb==2.0.1b0 ``` @@ -175,7 +175,7 @@ class TableSessionConfig(object): #### Sample Code -```Java +```python def get_session(self) -> TableSession: """ Retrieve a new TableSession instance. @@ -223,7 +223,7 @@ def close(self): #### Sample Code -```Java +```python class TableSessionPoolConfig(object): """ Configuration class for a TableSessionPool. @@ -285,7 +285,7 @@ class TableSessionPoolConfig(object): Here is an excerpt of the sample code: -```Java +```python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information diff --git a/src/zh/UserGuide/Master/Table/API/Programming-Python-Native-API.md b/src/zh/UserGuide/Master/Table/API/Programming-Python-Native-API.md index de3944b3..8f60a685 100644 --- a/src/zh/UserGuide/Master/Table/API/Programming-Python-Native-API.md +++ b/src/zh/UserGuide/Master/Table/API/Programming-Python-Native-API.md @@ -25,7 +25,7 @@ 安装依赖包: -```Java +```sh pip3 install apache-iotdb==2.0.1b0 ``` @@ -51,7 +51,7 @@ TableSession是IoTDB的一个核心类,用于与IoTDB数据库进行交互。 **TableSession:** -```Java +```python class TableSession(object): def insert(self, tablet: Union[Tablet, NumpyTablet]): """ @@ -126,7 +126,7 @@ TableSessionConfig是一个配置类,用于设置和创建TableSession 实例 #### 2.2.3 接口展示 -```Java +```python class TableSessionConfig(object): """ Configuration class for a TableSession. @@ -187,7 +187,7 @@ TableSessionPool 是一个会话池管理类,用于管理 TableSession 实例 **TableSessionPool:** -```Java +```python def get_session(self) -> TableSession: """ Retrieve a new TableSession instance. @@ -238,7 +238,7 @@ TableSessionPoolConfig是一个配置类,用于设置和创建 TableSessionPoo #### 3.2.3 接口展示 -```Java +```python class TableSessionPoolConfig(object): """ Configuration class for a TableSessionPool. @@ -293,7 +293,7 @@ Session示例代码:[Session Example](https://github.com/apache/iotdb/blob/rc/2. SessionPool示例代码:[SessionPool Example](https://github.com/apache/iotdb/blob/rc/2.0.1/iotdb-client/client-py/table_model_session_pool_example.py) -```Java +```python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information diff --git a/src/zh/UserGuide/latest-Table/API/Programming-Python-Native-API.md b/src/zh/UserGuide/latest-Table/API/Programming-Python-Native-API.md index de3944b3..8f60a685 100644 --- a/src/zh/UserGuide/latest-Table/API/Programming-Python-Native-API.md +++ b/src/zh/UserGuide/latest-Table/API/Programming-Python-Native-API.md @@ -25,7 +25,7 @@ 安装依赖包: -```Java +```sh pip3 install apache-iotdb==2.0.1b0 ``` @@ -51,7 +51,7 @@ TableSession是IoTDB的一个核心类,用于与IoTDB数据库进行交互。 **TableSession:** -```Java +```python class TableSession(object): def insert(self, tablet: Union[Tablet, NumpyTablet]): """ @@ -126,7 +126,7 @@ TableSessionConfig是一个配置类,用于设置和创建TableSession 实例 #### 2.2.3 接口展示 -```Java +```python class TableSessionConfig(object): """ Configuration class for a TableSession. @@ -187,7 +187,7 @@ TableSessionPool 是一个会话池管理类,用于管理 TableSession 实例 **TableSessionPool:** -```Java +```python def get_session(self) -> TableSession: """ Retrieve a new TableSession instance. @@ -238,7 +238,7 @@ TableSessionPoolConfig是一个配置类,用于设置和创建 TableSessionPoo #### 3.2.3 接口展示 -```Java +```python class TableSessionPoolConfig(object): """ Configuration class for a TableSessionPool. @@ -293,7 +293,7 @@ Session示例代码:[Session Example](https://github.com/apache/iotdb/blob/rc/2. SessionPool示例代码:[SessionPool Example](https://github.com/apache/iotdb/blob/rc/2.0.1/iotdb-client/client-py/table_model_session_pool_example.py) -```Java +```python # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information