⚡Evergy Client
A simple utility that you can use to login to your Evergy account and retrieve you meter readings.
Note: This is an unofficial utility that uses Evergy's non-public API.
Previously known as "KCPL"
Install
pip install evergy
Usage
from evergy.evergy import Evergy
evergy = Evergy("<evergy-username>", "<evergy-password>")
data = evergy.get_usage()
print("Today's kWh: " + str(data[-1]["usage"]))
Output
The last element from the get_usage() will be the latest data. The usage is in kilowatt-hours. I believe the peakDateTime is the
time during that day when your usage was the highest and the peakDemand is how many kilowatts you were drawing at that time.
Latest data:
{
'period': 'Saturday',
'billStart': '0001-01-01T00:00:00',
'billEnd': '0001-01-01T00:00:00',
'billDate': '2021-09-18T00:00:00',
'date': '9/18/2021',
'usage': 14.7756,
'demand': 3.7992,
'avgDemand': 0.0,
'peakDemand': 3.7992,
'peakDateTime': '12:45 p.m.',
'maxTemp': 71.0,
'minTemp': 71.0,
'avgTemp': 71.0,
'cost': 18.5748,
'isPartial': False
}
Related Projects
- KC Water: A similar project developed by Patrick McDonagh. Check it out!
Development
Setup
python -m pip install --upgrade virtualenv
virtualenv venv
.\venv\Scripts\activate.ps1
Code Formatting
Install the dev dependencies and run isort and flake8 to properly format the code.
pip install -r requirements_dev.txt
isort evergy/
flake8 evergy/
Build Docs
Windows PowerShell:
pip install -r docs/requirements_docs.txt
docs\make.bat clean; docs\make.bat html
Release New Version
- Bump
__version__inevergy/__init__.py
git commit -m "Bump version"
git tag -a v1.0.1 -m "v1.0.1"
git push --tags
Build Wheel
The
--no-isolationflag tells it to use the existing virtual env
python -m build --no-isolation --wheel
Upload to PyPi
Test
twine upload --verbose --repository testpypi dist/*
Prod
twine upload --verbose --repository pypi dist/*
Metadata
Release files for evergy 2.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| evergy-2.0.4-py3-none-any.whl | Python 3 | none | any | Details for evergy-2.0.4-py3-none-any.whl |
Release files / evergy-2.0.4-py3-none-any.whl
| Download URL | evergy-2.0.4-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f6eb2ff9a292ff1b74d4e33408c6cec01369c11b43ae6281e320c5b84b60921
|
|
BLAKE2b-256 checksum How to use checksums |
dd4daf0b0c0bb83e4d0a5ea5bf779a240cf411d08d34cb161e67d6be738a7f5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7
|
Security for evergy 2.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.