Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 913 Bytes

README.md

File metadata and controls

31 lines (21 loc) · 913 Bytes

Water Meter Data Utility for Kansas City Water

A simple utility that you can use to login to your KC Water account and retrieve your meter readings.

Install

pip install git+git://github.com/patrickjmcd/kcwater.git

Usage

# Import the package
from kcwater.kcwater import KCWater

kc_water = KCWater("username", "password")
kc_water.login()

# Get a list of hourly readings
hourly_data = kc_water.get_usage_hourly()

# Get a list of hourly readings
daily_data = kc_water.get_usage_daily()

print("Last daily data: {}\n\n".format(daily_data[-1]))
print("Last hourly data: {}\n\n".format(hourly_data[-1]))

print("Last daily reading: {} gal for {}".format(daily_data[-1]["gallonsConsumption"], daily_data[-1]["readDate"]))
print("Last hourly reading: {} gal for {} {}".format(hourly_data[-1]["gallonsConsumption"], hourly_data[-1]["readDate"], hourly_data[-1]["readDateTime"]))