Ai
1 Star 0 Fork 0

陈培俊/sky_python

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
test_postgres.py 482 Bytes
一键复制 编辑 原始数据 按行查看 历史
ChenPeijun 提交于 2025-07-05 19:47 +08:00 . to LF
from postgres import *
if __name__ == "__main__":
device_id = 7
names = ['light','temp', 'humi']
hours = 24
connection = connect_to_db()
if connection is None:
print("Failed to connect to the database.")
exit(-1)
else:
# values = get_tele_values_in_hours(connection, f"tele_{device_id}", names, hours)
values = get_vbat_in_days(connection, f"tele_{device_id}", days=180)
print(values)
connection.close()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/pei-jun-chen/sky_python.git
git@gitee.com:pei-jun-chen/sky_python.git
pei-jun-chen
sky_python
sky_python
master

搜索帮助