xumu_iotdb/config.py

18 lines
465 B
Python
Raw Normal View History

2024-01-24 15:32:58 +08:00
# 数据库插入类型
import base64
2024-02-24 09:38:55 +08:00
# url
2024-01-24 15:32:58 +08:00
baseHost = "https://iot.lihaink.cn/iotdb_restapi"
# 注意这里前面不能加/
insertUri = "rest/v2/insertRecords"
queryUri = "rest/v2/query"
2024-01-25 09:42:51 +08:00
nonQueryUri = "rest/v2/nonQuery"
2024-01-24 15:32:58 +08:00
# 鉴权
username = 'root'
password = 'root'
code = (username + ":" + password).encode("utf-8")
token = base64.encodebytes(code).decode("utf-8").strip()
headers = {
'ContentType': 'application/json',
'Authorization': "Basic " + token
}