From 7f3d322c891aa5f37d5d85e5a17f717d0f8507ad Mon Sep 17 00:00:00 2001 From: Sean Ely <105326513+sean-tdengine@users.noreply.github.com> Date: Thu, 15 Sep 2022 11:46:27 -0700 Subject: [PATCH] docs: updated cloud python connect Updated the Jupiter lab reference --- .../en/15-programming/01-connect/01-python.md | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/docs/en/15-programming/01-connect/01-python.md b/docs/en/15-programming/01-connect/01-python.md index 31ee3b83de..f82c53de8b 100644 --- a/docs/en/15-programming/01-connect/01-python.md +++ b/docs/en/15-programming/01-connect/01-python.md @@ -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. - + ``` @@ -90,14 +90,29 @@ For more details about how to write or query data via REST API, please check [RE **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. + + + ```bash pip install jupyterlab -pip install notebook pip3 install -U taospy ``` +You'll need to have Python3 installed. + + + + +``` +conda install -c conda-forge jupyterlab +conda install -c conda-forge taospy +``` + + + + **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. @@ -105,13 +120,13 @@ In order for Jupyter to connect to TDengine cloud service, before launching Jupy ```bash export TDENGINE_CLOUD_TOKEN="" export TDENGINE_CLOUD_URL="" -jupyter notebook +jupyter lab ``` **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 {{#include docs/examples/python/develop_tutorial.py:connect}} -``` \ No newline at end of file +``` -- GitLab