python - 将 JSON 数据从 Python 更新到 Firebase
问题描述
我有来自我的传感器的数据,我用我的Raspberry Pi
. 我将这些数据打包成一个JSON
文件。我Python
想编写一个程序,每小时更新这些数据并将其上传到Firebase
.
到目前为止,我的代码如下所示:
from firebase import firebase
import requests
import json
from pprint import pprint
with open (thejsondata) as data_file:
data=json.load(data_file)
pprint(data)
firebase=firebase.FirebaseApplication("...")
r2 = requests.put("https://testproject...",data=jsondata)
print(r2)
我如何设法将其上传到Firebase
每小时?
解决方案
推荐阅读
- vue.js - 为什么“view-source:”显示未渲染的指令?
- java - 如何使用 targetdataline 给出的字节数组来获取有关音频的信息?
- javascript - Nuxt.js:css-loader 的问题,它从 font-family 中删除引号
- python - 如果其他速记需要速记建议
- python - 我不明白这个循环的退出条件在哪里
- typescript - 处理来自(数组的 rxjs
) 当数组为空时 - scala - 是否有 Scala ES SDK 可以让我在自己维护的实例上运行 ES 客户端并连接到 AWS ES?
- sql - SQL 中的递归 CTE 以替换物料清单中的虚拟构建
- google-kubernetes-engine - 将自定义网关与 GKE 上的 Google Cloud Run 结合使用
- node.js - GCP FTP 节点应用程序的最佳服务是什么?