From 8f589084414406745119ffe61405872e2a800677 Mon Sep 17 00:00:00 2001 From: Bo Ding Date: Tue, 7 Jun 2022 14:27:56 +0800 Subject: [PATCH] fix: python rest example (#13552) --- docs-examples/python/connect_rest_examples.py | 3 +-- docs-examples/python/rest_client_example.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs-examples/python/connect_rest_examples.py b/docs-examples/python/connect_rest_examples.py index 3303eb0e19..900ec1022e 100644 --- a/docs-examples/python/connect_rest_examples.py +++ b/docs-examples/python/connect_rest_examples.py @@ -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 diff --git a/docs-examples/python/rest_client_example.py b/docs-examples/python/rest_client_example.py index 46d33a1d79..59c629df95 100644 --- a/docs-examples/python/rest_client_example.py +++ b/docs-examples/python/rest_client_example.py @@ -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) -- GitLab