与srp能量数据交互的非官方python模块
srpenerg的Python项目详细描述
srpenergy模块是一个非正式的python模块,用于与Srp能量数据交互。
- 发展:https://github.com/lamoreauxlab/srpenergy-api-client-python/
- 文档:https://srpenergy-api-client-python.readthedocs.io/
SRP为客户提供每小时的能源使用报告。srpenergy模块获取在网站上找到的数据。
Usage Date | Hour | kWh | Cost |
---|---|---|---|
9/19/2018 | 12:00 AM | 1.2 | $0.17 |
9/19/2018 | 1:00 AM | 2.1 | $0.30 |
9/19/2018 | 2:00 AM | 1.5 | $0.23 |
9/19/2018 | 3:00 AM | 1.3 | $0.20 |
9/19/2018 | 4:00 AM | 1.5 | $0.23 |
9/19/2018 | 5:00 AM | 1.5 | $0.23 |
使用
fromsrpenergy.clientimportSrpEnergyClientaccountid='your account id'username='your username'password='your password'client=SrpEnergyClient(accountid,username,password)usage=client.usage(start_date,end_date)date,hour,isodate,kwh,cost=usage[0]