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.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 007f47aa68f6db160e3febc6df047096966d2a12312cc2a9b7c0ad85e85b8b22 |
|
MD5 | 5e045fe99aa2ab25db719a42996fb280 |
|
BLAKE2b-256 | deb8c34dbd99fa864b9dcc6421a469029b2f6383e3f254618200bf3bd86e72f2 |