skillfed

energyzero

Asynchronous Python client providing energy/gas prices from EnergyZero

energyzero v5.0.2 73.5K downloads/30d#14,983 on PyPI25
Permissive license MIT Active released

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 energyzero

uv

uv add energyzero

poetry

poetry add energyzero

Installing 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

Development Status :: 5 - Production/StableFramework :: AsyncIOIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Libraries :: Python Modules

Tags

energy price api clientelectricity gas pricing asyncenergyzero api pythondynamic energy pricesreal-time utility ratesaiohttp energy dataday-ahead pricing client
energy-pricingasync-clientrest-graphql

More Python Modules packages