energyzero
Asynchronous Python client providing energy/gas prices from EnergyZero
What it is and what it does
EnergyZero is an async Python client that fetches real-time and day-ahead electricity and gas prices from the EnergyZero API, which also serves third-party energy retailers. It supports two backends: a REST API for single-date queries (hourly or quarter-hour electricity, daily gas) and a GraphQL endpoint for multi-day ranges with extended metadata. Prices are returned in EUR/kWh for electricity and EUR/m³ for gas, with support for multiple price types (market, market-with-VAT, all-in excluding VAT, all-in including VAT). The client provides convenience methods to extract current prices, averages, extremes, and price lookups at specific timestamps, making it straightforward to integrate energy pricing into home automation, billing systems, or energy-optimization applications.
The package requires Python 3.12 or later and depends on aiohttp for HTTP requests and yarl for URL handling. It is actively maintained, has no known security vulnerabilities, and is classified as production-stable. The API is designed around async/await patterns, so it integrates naturally with asyncio-based applications.
Use it for:
- Fetch today's and tomorrow's electricity prices to display in a home energy dashboard or automation system.
- Retrieve gas prices for billing reconciliation or cost forecasting across multiple days.
- Build price-aware scheduling logic that shifts energy consumption to cheaper hours or quarter-hour windows.
- Integrate with third-party energy providers (ANWB Energie, Energie van Ons, etc.) that use EnergyZero's pricing.
- Monitor extreme prices and alert users when electricity or gas rates exceed a threshold.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Asynchronous Python client for retrieving dynamic electricity and gas prices from the EnergyZero API and compatible energy providers via REST or GraphQL backends.
Yes. The package is actively maintained, has zero known vulnerabilities, low install friction, and a permissive MIT license. It is well-suited for any Python application needing EnergyZero pricing data. The async design and support for multiple price types and backends make it flexible for both simple queries and complex multi-day forecasting. Install it if you need to integrate energy pricing into a Python project targeting EnergyZero or compatible providers.
Install
energyzero on PyPI
pip
pip install energyzerouv
uv add energyzeropoetry
poetry add energyzeroInstalling energyzero
Before you install
Low install friction with a pure-Python wheel and only two runtime dependencies (aiohttp, yarl). Repository is actively maintained with recent commits and no known vulnerabilities.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for commercial and private projects.
Quickstart
import asyncio
from datetime import datetime
from zoneinfo import ZoneInfo
from energyzero import EnergyZero, Interval, PriceType
async def main():
async with EnergyZero() as client:
local_tz = ZoneInfo("Europe/Amsterdam")
today = datetime.now(local_tz).date()
prices = await client.get_electricity_prices(
start_date=today,
interval=Interval.QUARTER,
price_type=PriceType.ALL_IN,
local_tz=local_tz,
)
print(prices.average_price)
asyncio.run(main())
Requires Python 3.12 or later; aiohttp and yarl must be installed (handled by pip automatically).
Verify before relying
- Whether GraphQL backend supports the full range of historical pricing data or only forward-looking forecasts.
- Performance characteristics when querying multi-day ranges via GraphQL versus repeated REST calls.
- Availability and stability guarantees for the EnergyZero API endpoints themselves.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — aiohttp, yarl |
| Maintenance | actively maintained — 116 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 73,537/month — #14,983 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: energyzero-5.0.2-py3-none-any.whl
Keywords: energy, energyzero, gas, prices, api, async, client
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
amberelectricProvides a Python interface to the Amber…
permissive · top 15,000 on PyPI
electrickiwi-apiAsync Python client for the Electric Kiwi API…
copyleft · top 15,000 on PyPI
forecast-solarAsynchronous Python client for fetching solar…
permissive · top 15,000 on PyPI
gridstatusgridstatus provides a unified Python API to…
unclear · top 15,000 on PyPI
p1monitorAsynchronous Python client library for reading…
permissive · top 15,000 on PyPI
entsoe-pyProvides Python clients to query the ENTSO-E…
permissive · top 15,000 on PyPI
pyTibberPython library for querying Tibber's…
copyleft · top 15,000 on PyPI
pysmartthingsAsynchronous Python client for fetching data…
permissive · top 15,000 on PyPI
opowerFetches historical and forecasted energy usage…
permissive · top 15,000 on PyPI
energyquantifiedA Python client library for querying Energy…
permissive · top 15,000 on PyPI