Observed since 21 Oct, 11:42 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Async Python client for the unofficial Budget Thuis (Budget Energie) API
Async Python client for the unofficial Budget Thuis (Budget Energie) API: hourly dynamic electricity prices, daily usage/solar production/cost, monthly installment, free-energy windows, and contract discovery.
Unaffiliated. This project is not affiliated with, endorsed by, or supported by Budget Thuis / Budget Energie. The API is not publicly documented and may change or break at any time. "Budget Thuis" is a trademark of its respective owner.
Built for the ha-budget-thuis Home Assistant integration, but usable standalone in any asyncio application.
pip install aiobudgetthuis
Requires Python 3.12+ and an aiohttp session managed by you.
import aiohttp
from aiobudgetthuis import BudgetThuisClient
async def main() -> None:
async with aiohttp.ClientSession() as session:
client = BudgetThuisClient(session)
# Login replays the server-rendered OAuth2 + PKCE form. Store only the
# refresh token; never persist the password.
tokens = await client.login("user@example.com", "password")
contracts = await client.async_get_contracts(tokens.access_token)
contract = next(c for c in contracts if c.is_active)
from datetime import datetime, timedelta
now = datetime.now().astimezone()
details = await client.hourly_tariff(
tokens.access_token, contract.id, now, now + timedelta(days=1)
)
for day in details.days:
for tariff in day.electricity:
print(tariff.period_from, tariff.total.gross)
Later sessions authenticate with await client.refresh(refresh_token).
login(username, password) / refresh(refresh_token) → Tokensasync_get_contracts(access_token) → list[Contract]hourly_tariff(...) → HourlyTariffDetails (wrap in PriceData for derived values:
current/next slot, daily min/max/average, forecast attributes)usage_summary(...) → UsageSummary (per-day usage, solar production, cost, month-to-date)monthly_amount(...) → MonthlyAmount (installment)free_energy_status(...) → FreeEnergyStatuscontract_info(...) → ContractInfodaily_reading_mandate(...) → MandateErrors: BudgetThuisAuthError (bad credentials / refused token) and
BudgetThuisConnectionError (network / unexpected upstream response), both subclasses of
BudgetThuisError.
ha-budget-thuis — Home Assistant (HACS) integration built on this client.python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
ruff check . && ruff format --check . && mypy src && pytest -q
MIT
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.1.1 | 29 Aug 2026 | 6 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 21 Oct, 11:42 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:cb644c438765ca0b29a0a4049dffac8166cb7100eff3f034d0c6c38393c5e175