我在 JSON 格式的原始資料中有變數顏色和值。我想從郵遞員到 python 的值。如何在 python 中獲取身體原始資料?該郵遞員身體原始資料影像-> 為原始資料影像著色
uj5u.com熱心網友回復:
您可以使用 HTTP 請求直接從服務器請求資料: https ://requests.readthedocs.io/en/latest/
r = requests.get('192.168.1.6:8069/web/raw?default=red')
r.json()
或將資料從郵遞員匯出到.json檔案并使用讀取檔案open()
with open('example.json', 'r') as myfile:
data = myfile.read()
uj5u.com熱心網友回復:
我使用python開發的odoo工具。那odoo獲取原始資料的方法很少改變方法。也許這種方式適用于python
@http.route('/cams/biometrics 3.0/',method=["POST"], csrf=False, auth='public', type = "http")
def generate_attendance(self, **params):
data = json.loads(request.httprequest.data)
json_object = json.dumps(data)
轉載請註明出處,本文鏈接:https://www.uj5u.com/qianduan/518640.html
