An unofficial Python module for interacting with Srp Energy data
Project description
The srpenergy module is an unofficial Python module for interacting with Srp Energy data.
Development: https://github.com/lamoreauxlab/srpenergy-api-client-python/
Documentation: https://srpenergy-api-client-python.readthedocs.io/
Srp provides an hourly energy usage report for their customers. The srpenergy module fetches the data found via the api.
The data returned from the hourly url https://myaccount.srpnet.com/myaccountapi/api/usage/hourlydetail?billaccount=<code>&beginDate=<MM-DD-YYYY>&endDate=<MM-DD-YYYY>
{ "hourlyConsumptionList": [],
"hourlyGenerationList": [],
"hourlyReceivedList": [],
"hourlyUsageList":[{
"date": "2019-10-09T00:00:00",
"hour": "2019-10-09T00:00:00",
"onPeakKwh": 0.0,
"offPeakKwh": 0.0,
"shoulderKwh": 0.0,
"superOffPeakKwh": 0.0,
"totalKwh": 0.4,
"onPeakCost": 0.0,
"offPeakCost": 0.0,
"shoulderCost": 0.0,
"superOffPeakCost": 0.0,
"totalCost": 0.08
}
],
"demandList":[]
}
Installing
It is distributed on PyPI and can be installed with pip:
pip install srpenergy
Use
from srpenergy.client import SrpEnergyClient
accountid = '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]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for srpenergy-1.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0697159a320cc09bfe2d7e5fdef909ed0db1dcca40137c4454384926461f2a8b |
|
MD5 | 596d9cd5d511bdddfd91bc568c197816 |
|
BLAKE2b-256 | 08a4ad10991812616d8f3e566283bd6bfe9c97b686f92b7b1751cf314474e930 |