mirror of
https://github.com/taosdata/TDengine
synced 2026-05-24 10:09:01 +00:00
* docs: add R example source code * test: check if RJDBC was installed * test: add R test scripts * test: chmod of test_R.sh * test: fix test_go.sh; add R sample to document * test: add test scripts to cases.task * test: fix errors caused by tset_python.sh and test_java.sh * test: fix test_python.sh * test: modify java test case and improve opentsdb-json.mdx * test: fix test_R.sh
19 lines
485 B
Python
19 lines
485 B
Python
import taos
|
|
|
|
|
|
def test_connection():
|
|
# all parameters are optional.
|
|
# if database is specified,
|
|
# then it must exist.
|
|
conn = taos.connect(host="localhost",
|
|
port=6030,
|
|
user="root",
|
|
password="taosdata",
|
|
database="log")
|
|
print('client info:', conn.client_info)
|
|
print('server info:', conn.server_info)
|
|
conn.close()
|
|
|
|
|
|
if __name__ == "__main__":
|
|
test_connection()
|