mirror of
https://github.com/taosdata/TDengine
synced 2026-05-24 10:09:01 +00:00
15 lines
347 B
Python
15 lines
347 B
Python
import taosrest
|
|
|
|
client = None
|
|
|
|
try:
|
|
client = taosrest.RestClient(url="http://localhost:6041",
|
|
user="root",
|
|
password="taosdata",
|
|
timeout=30)
|
|
|
|
result = client.sql(f"SELECT ts, current, location FROM power.meters limit 100")
|
|
print(result)
|
|
|
|
except Exception as err:
|
|
print(err)
|