fix: python rest example (#13555)
This commit is contained in:
parent
6dc497609b
commit
feba9cdfcb
|
@ -1,10 +1,9 @@
|
|||
# ANCHOR: connect
|
||||
from taosrest import connect, TaosRestConnection, TaosRestCursor
|
||||
|
||||
conn: TaosRestConnection = connect(host="localhost",
|
||||
conn: TaosRestConnection = connect(url="http://localhost:6041",
|
||||
user="root",
|
||||
password="taosdata",
|
||||
port=6041,
|
||||
timeout=30)
|
||||
|
||||
# ANCHOR_END: connect
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from taosrest import RestClient
|
||||
|
||||
client = RestClient("localhost", 6041, "root", "taosdata")
|
||||
client = RestClient("http://localhost:6041", user="root", password="taosdata")
|
||||
res: dict = client.sql("SELECT ts, current FROM power.meters LIMIT 1")
|
||||
print(res)
|
||||
|
||||
|
|
Loading…
Reference in New Issue