TDengine/docs/examples/python/connect_example.py

15 lines
385 B
Python
Raw Normal View History

import taos
def test_connection():
# all parameters are optional.
conn = taos.connect(host="localhost",
port=6030,
user="root",
2024-08-01 12:13:35 +00:00
password="taosdata")
print('client info:', conn.client_info)
print('server info:', conn.server_info)
conn.close()
if __name__ == "__main__":
test_connection()