2022-05-21 03:11:57 +00:00
|
|
|
import taos
|
|
|
|
|
|
2024-07-03 08:33:55 +00:00
|
|
|
conn = taos.connect(
|
|
|
|
|
host="localhost",
|
|
|
|
|
user="root",
|
|
|
|
|
password="taosdata",
|
|
|
|
|
database="test",
|
|
|
|
|
port=6030,
|
|
|
|
|
config="/etc/taos", # for windows the default value is C:\TDengine\cfg
|
|
|
|
|
timezone="Asia/Shanghai",
|
|
|
|
|
) # default your host's timezone
|
2022-05-21 03:11:57 +00:00
|
|
|
|
|
|
|
|
server_version = conn.server_info
|
|
|
|
|
print("server_version", server_version)
|
|
|
|
|
client_version = conn.client_info
|
2022-08-23 07:12:32 +00:00
|
|
|
print("client_version", client_version) # 3.0.0.0
|
2022-05-21 03:11:57 +00:00
|
|
|
|
|
|
|
|
conn.close()
|
|
|
|
|
|
|
|
|
|
# possible output:
|
2022-08-23 07:12:32 +00:00
|
|
|
# 3.0.0.0
|
|
|
|
|
# 3.0.0.0
|