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.2.tar.gz (14.3 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.2-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aioeloverblik-0.1.2.tar.gz
  • Upload date:
  • Size: 14.3 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.2.tar.gz
Algorithm Hash digest
SHA256 c8fb8f411e32a8957ef80d230a9a2d067dadd6a29770ce8ced47e3036cab69a6
MD5 f9e935cfe51d3a3d4bec0ea2ea96fd19
BLAKE2b-256 9aeb792076e7583d899bfa89fdbe474b19c60c4d3dd3658292608b5289beadaf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aioeloverblik-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 acbfed0eebab886e8132a4676d56e8993c6a811bb922673c5c5272a24e105aca
MD5 b67d859580d27ac03421475d297f9992
BLAKE2b-256 85f8f43ee1718233c199a77cecf1053b0fa6d51e48f494c51e53b1a5d8ca5511

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