Skip to main content

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

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aioeloverblik-0.1.1.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aioeloverblik-0.1.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file aioeloverblik-0.1.1.tar.gz.

File metadata

  • Download URL: aioeloverblik-0.1.1.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aioeloverblik-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f139ede8be4cc5966cd339276a22a1b5308c2a4f9da948da3622123ac6f0ff13
MD5 26ae7fb30e013becf010a22e2a7fd16d
BLAKE2b-256 5cc9b0444db0891ca8d4f4d75a4d75438c1cb51d6cdf52b02476fad6e4366171

See more details on using hashes here.

File details

Details for the file aioeloverblik-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: aioeloverblik-0.1.1-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

Hashes for aioeloverblik-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1325b21da255abb0e9480a7173d791e2077404e5d620bdc1aa4cfebe2680f362
MD5 c8efad8e023caff2d0b4ea525422c995
BLAKE2b-256 5ca8ad5f33b06a9e48a8ade5e7e8d096dd37b45288fa03294abe34a5bd1843c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page