--- sidebar_label: Python title: Connect with Python Connector description: Connect to TDengine cloud service using Python connector --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; ## Install Connector First, you need to install the `taospy` module version >= `2.6.2`. Run the command below in your terminal. ``` pip3 install -U taospy ``` You'll need to have Python3 installed. ``` conda install -c conda-forge taospy ``` ## Config Run this command in your terminal to save TDengine cloud token and URL as variables: ```bash export TDENGINE_CLOUD_TOKEN="" export TDENGINE_CLOUD_URL="" ``` ```bash set TDENGINE_CLOUD_TOKEN="" set TDENGINE_CLOUD_URL="" ``` ```powershell $env:TDENGINE_CLOUD_TOKEN="" $env:TDENGINE_CLOUD_URL="" ``` Alternatively, you can also set environment variables in your IDE's run configurations. :::note Replace and with cloud token and URL. To obtain the value of cloud token and URL, please log in [TDengine Cloud](https://cloud.tdengine.com) and click "Connector" and then select "Python". ::: ## Connect Copy code bellow to your editor and run it. ```python {{#include docs/examples/python/develop_tutorial.py:connect}} ``` For how to write data and query data, please refer to and . For more details about how to write or query data via REST API, please check [REST API](https://docs.tdengine.com/cloud/programming/connector/rest-api/).