Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aioeloverblik

PyPI version License: MIT Tests

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

MIT

About

Async Python wrapper for Eloverblik.dk API (Customer & ThirdParty)

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages