Async Python wrapper for the Eloverblik.dk API.
Supports both:
- Customer API: Access your own electricity data (metering points, charges, time series).
- ThirdParty API: Access data via authorization scopes (for apps/services).
Built with httpx and pydantic for robustness and type safety.
pip install aioeloverblikimport asyncio
from aioeloverblik import EloverblikClient
async def main():
async with EloverblikClient(refresh_token="YOUR_TOKEN") as client:
# Get metering points
mps = await client.get_metering_points()
if mps:
mp_id = mps[0].metering_point_id
# Get time series data (last 3 days)
from datetime import date, timedelta
today = date.today()
from_date = today - timedelta(days=3)
ts_data = await client.get_time_series([mp_id], from_date, today, aggregation="Hour")
print(f"Got {len(ts_data)} market documents")
for doc in ts_data:
for series in doc.time_series:
for period in series.periods:
for point in period.points:
print(f"Time: {point.position}, Value: {point.quantity} {series.measurement_unit_name}")
asyncio.run(main())import asyncio
from aioeloverblik import EloverblikThirdPartyClient
async def main():
async with EloverblikThirdPartyClient(refresh_token="YOUR_TOKEN") as client:
auths = await client.get_authorizations()
print(auths)
asyncio.run(main())Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.