Skip to content

Commit

Permalink
Merge pull request #11 from lawrencefoley/feature/evergy-rename
Browse files Browse the repository at this point in the history
Rename instances of KCPL to Evergy
  • Loading branch information
lawrencefoley authored Sep 18, 2021
2 parents 5eb69c1 + 9da9589 commit 7d0fc20
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .idea/kcpl.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@ pip install git+git://github.com/lawrencefoley/evergy.git

```python
# Import the package
from kcpl.kcpl import KCPL
from evergy.evergy import Evergy

# Login
kcpl = KCPL("username", "password")
kcpl.login()
evergy = Evergy("username", "password")
evergy.login()

# Get a list of daily readings
# Note, there is more data available such as 'cost' and 'avgTemp'
data = kcpl.get_usage()
data = evergy.get_usage()
logging.info("Last usage reading: " + str(data[-1]))
logging.info("Last usage reading: " + str(data[-1]["usage"]))

# End your session by logging out
kcpl.logout()
evergy.logout()
```

## Development
### Code Formatting
Install the dev dependencies and run `isort` and `flake8` to properly format the code.
```bash
pip install -r requirements_dev.txt
isort kcpl/
flake8 kcpl/
isort evergy/
flake8 evergy/
```

### Release New Version
Expand Down
1 change: 1 addition & 0 deletions evergy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "1.0.1"
10 changes: 5 additions & 5 deletions kcpl/kcpl.py → evergy/evergy.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
today = date.today()


class KCPL:
class Evergy:
def __init__(self, username, password):
self.logged_in = False
self.session = None
Expand Down Expand Up @@ -95,13 +95,13 @@ def get_creds():
username = creds["username"]
password = creds["password"]

kcpl = KCPL(username, password)
kcpl.login()
evergy = Evergy(username, password)
evergy.login()

# Get a list of daily readings
data = kcpl.get_usage()
data = evergy.get_usage()
logging.info("Last usage data: " + str(data[-1]))
logging.info("Last usage reading: " + str(data[-1]["usage"]))

# End your session by logging out
kcpl.logout()
evergy.logout()
Empty file removed kcpl/__init__.py
Empty file.
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
long_description = f.read()

setup(
name="kcpl",
name="evergy",
version="0.0.2",
description="A utility that reads electric utility meter data from KCPL.com",
description="A utility that reads electric utility meter data from Evergy.com",
long_description=long_description,
url="https://github.com/lawrencefoley/kcpl",
url="https://github.com/lawrencefoley/evergy",
author="Lawrence Foley",
author_email="emwav333@gmail.com",
# Classifiers help users find your project by categorizing it.
Expand All @@ -42,7 +42,7 @@
# project page. What does your project relate to?
#
# Note that this is a string of words separated by whitespace, not a list.
keywords="kcpl evergy api utilities kansas-city", # Optional
keywords="evergy kcpl kansas-city electricity-consumption electricity-meter api", # Optional
# You can just specify package directories manually here if your project is
# simple. Or you can use find_packages().
#
Expand Down

0 comments on commit 7d0fc20

Please sign in to comment.