Async Python wrapper for Eloverblik.dk API (Customer & ThirdParty)
Project description
aioeloverblik
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.
Resources
Installation
pip install aioeloverblik
Usage
Customer API (Own Data)
import 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())
ThirdParty API
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())
Contributing
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.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aioeloverblik-0.1.0.tar.gz.
File metadata
- Download URL: aioeloverblik-0.1.0.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b7b548262718c52ec3714ed195c0bcb2901709f46fe4370324afdc37477aa3f4
|
|
| MD5 |
31d8786e06d1876d282ef6ef805b07e0
|
|
| BLAKE2b-256 |
c2f8bc9720bec60e16ccb203e43855b805eeb306aa72be68ea921693b9fee96e
|
File details
Details for the file aioeloverblik-0.1.0-py3-none-any.whl.
File metadata
- Download URL: aioeloverblik-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c433491fb8681d3a652903b7534a95fcd67041aacc7b8ac4786e970f279744c
|
|
| MD5 |
308ed9de8701c31e815fe8e628bc557e
|
|
| BLAKE2b-256 |
18e26666d9b7ecdd6e0e5e2cd100cf4dd572daadf53487d7c03a55e91962ca58
|