opower
A Python library for getting historical and forecasted usage/cost from utilities that use opower.com such as PG&E
Decision gist · record as of 2026-08-14
Yes, if you have an account with a supported US utility and want programmatic access to your usage and cost data. The library is actively maintained, has no known vulnerabilities, installs cleanly, and is purpose-built for this task. The main gotcha is that it requires Python 3.11+ and async code; if your utility isn't listed, you'd need to contribute support for it.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.11+.
- Async-only API; must be called within an async context.
- Low friction install with a pure-Python wheel.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must retain license notices in distributions.
last release 2026-07-26 (19 days) · last repo commit 2026-08-07 · 106 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 77,163 downloads/mo, #14,553 on PyPI
Alternatives
Verify before relying
pip install opower
import asyncio
from opower import Opower
async def get_usage():
async with Opower(username='user', password='pass', utility='pge') as opower:
usage = await opower.get_historical_usage()
return usage
asyncio.run(get_usage())- Whether all listed utilities remain actively supported or if some have been deprecated
- Rate limits or throttling policies enforced by individual utility providers
- Data freshness guarantees (how often historical and forecast data are updated)
What it is and what it does
opower is a Python library that connects to utility company websites powered by the Opower platform to retrieve your historical energy usage and cost data, plus forecasts. It wraps the authentication and API calls needed to pull this information from dozens of US utilities—including major providers like PG&E, ComEd, Exelon subsidiaries, and many regional cooperatives. The library is async-first and designed to work with Home Assistant, making it useful for home energy monitoring and automation.
The package depends on aiohttp for HTTP requests, arrow for date handling, aiozoneinfo for timezone support, and pyotp for two-factor authentication. It includes both a Python API and a command-line tool. Since utilities change their authentication and API endpoints over time, the library is actively maintained to keep up with those changes.
Use it for
- Integrate real-time energy usage and cost forecasts into Home Assistant for home automation dashboards
- Build personal energy monitoring tools that track consumption trends across multiple utility accounts
- Automate billing alerts or notifications when forecasted costs exceed a threshold
- Export historical usage data for analysis or comparison with solar/renewable generation systems
- Feed utility data into smart home routines that adjust heating/cooling based on cost forecasts
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you have an account with a supported US utility and want programmatic access to your usage and cost data.
The library is actively maintained, has no known vulnerabilities, installs cleanly, and is purpose-built for this task. The main gotcha is that it requires Python 3.11+ and async code; if your utility isn't listed, you'd need to contribute support for it.
Install
opower on PyPI
Before you install
Low friction install with a pure-Python wheel. Actively maintained with a recent release (19 days old) and steady commit activity. Requires Python 3.11 or later.
Requires Python 3.11+. Async-only API; must be called within an async context.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must retain license notices in distributions.
Quickstart
pip install opower
import asyncio
from opower import Opower
async def get_usage():
async with Opower(username='user', password='pass', utility='pge') as opower:
usage = await opower.get_historical_usage()
return usage
asyncio.run(get_usage())
Verify before relying
- Whether all listed utilities remain actively supported or if some have been deprecated
- Rate limits or throttling policies enforced by individual utility providers
- Data freshness guarantees (how often historical and forecast data are updated)
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesaiohttpaiozoneinfoarrowpyotp |
| Maintenance | Actively maintained 19 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 77,163 / month, #14,553 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: opower-0.19.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “utility bill data api”
- opowerFetches historical and forecasted energy usage and cost data from…
- openbb-congress-govProvides access to U.S. legislative data from Congress.gov, including…
- cyclonedx-python-libProvides data models, validators, and serialization tools to create,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Utilities packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.
Install it if you need to display or transform source code.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
See also openbb-us-eia · peco · electrickiwi-api · gridstatus · power-grid-model · forecast-solar · pandapower · amberelectric · energyzero · sense-energy