--- id: opower version: "0.19.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # opower — A Python library for getting historical and forecasted usage/cost from utilities that use opower.com such as PG&E License: permissive · Maintenance: active · Downloads: 77.2K/mo ## 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 above — verify before relying. Fetches historical and forecasted energy usage and cost data from utility companies that use the Opower platform, supporting dozens of US utilities through their web APIs. 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 pip install opower uv add opower poetry add opower ## Installing opower 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. 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()) Requires Python 3.11+. Async-only API; must be called within an async context. 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_current - Install friction: low - Maintenance: active - Downloads: 77.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags utility bill data api, energy usage forecast, opower integration, electric bill history, home energy monitoring, utility cost data, power consumption api, energy-monitoring, home-automation, async-api [View on SkillFed](https://skillfed.io/packages/opower) · [View on PyPI](https://pypi.org/project/opower/)