w1ll1am23 / pydukeenergy

Access to the undocumented Duke Energy usage API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pydukeenergy

Python3 interface to the unofficial Duke Energy API.

NOTE This isn't using an official API therefore this library could stop working at any time, without warning.

from pydukeenergy.api import DukeEnergy

def main():
	# update_interval is optional default is 60 minutes
    duke = DukeEnergy("your_user_name", "your_password", update_interval=60)
    meters = duke.get_meters()
    for meter in meters:
    	print(meter.get_usage())

About

Access to the undocumented Duke Energy usage API

License:MIT License


Languages

Language:Python 100.0%