未验证 提交 7f3d322c 编写于 作者: S Sean Ely 提交者: GitHub

docs: updated cloud python connect

Updated the Jupiter lab reference
上级 a804fc3d
...@@ -13,7 +13,7 @@ import TabItem from '@theme/TabItem'; ...@@ -13,7 +13,7 @@ import TabItem from '@theme/TabItem';
First, you need to install the `taospy` module version >= `2.6.2`. Run the command below in your terminal. First, you need to install the `taospy` module version >= `2.6.2`. Run the command below in your terminal.
<Tabs defaultValue="pip"> <Tabs defaultValue="pip" groupID="package">
<TabItem value="pip" label="pip"> <TabItem value="pip" label="pip">
``` ```
...@@ -90,14 +90,29 @@ For more details about how to write or query data via REST API, please check [RE ...@@ -90,14 +90,29 @@ For more details about how to write or query data via REST API, please check [RE
**Step 1: Install** **Step 1: Install**
For the users who are familiar with Jupyter to program in Python, both TDengine Python connector and Jupyter need to be ready in your environment. If you have not done yet, please use below commands to install them. For the users who are familiar with Jupyter to program in Python, both TDengine Python connector and Jupyter need to be ready in your environment. If you have not done yet, please use the commands below to install them.
<Tabs defaultValue="pip" groupID="package">
<TabItem value="pip" label="pip">
```bash ```bash
pip install jupyterlab pip install jupyterlab
pip install notebook
pip3 install -U taospy pip3 install -U taospy
``` ```
You'll need to have Python3 installed.
</TabItem>
<TabItem value="conda" label="conda">
```
conda install -c conda-forge jupyterlab
conda install -c conda-forge taospy
```
</TabItem>
</Tabs>
**Step 2: Configure** **Step 2: Configure**
In order for Jupyter to connect to TDengine cloud service, before launching Jupypter, the environment setting must be performed. We use Linux bash as example. In order for Jupyter to connect to TDengine cloud service, before launching Jupypter, the environment setting must be performed. We use Linux bash as example.
...@@ -105,13 +120,13 @@ In order for Jupyter to connect to TDengine cloud service, before launching Jupy ...@@ -105,13 +120,13 @@ In order for Jupyter to connect to TDengine cloud service, before launching Jupy
```bash ```bash
export TDENGINE_CLOUD_TOKEN="<token>" export TDENGINE_CLOUD_TOKEN="<token>"
export TDENGINE_CLOUD_URL="<url>" export TDENGINE_CLOUD_URL="<url>"
jupyter notebook jupyter lab
``` ```
**Step 3: Connect** **Step 3: Connect**
Once jupyter notebook is launched, Jupyter notebook service is automatically connected and shown in your browser. You can create a new Python file and copy the sample code below and run it. Once jupyter lab is launched, Jupyter lab service is automatically connected and shown in your browser. You can create a new notebook and copy the sample code below and run it.
```python ```python
{{#include docs/examples/python/develop_tutorial.py:connect}} {{#include docs/examples/python/develop_tutorial.py:connect}}
``` ```
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册