Skip to main content

Retrieval of Spanish Electricity hourly prices (PVPC)

Project description

PyPI Version pre-commit.ci Status Build Status

aiopvpc

Simple aio library to download Spanish electricity hourly prices.

Made to support the pvpc_hourly_pricing HomeAssistant integration.

Buy Me A Coffee donate button

Install

Install with pip install aiopvpc or clone it to run tests or anything else.

Usage

import aiohttp
from datetime import datetime
from aiopvpc import PVPCData

async with aiohttp.ClientSession() as session:
    pvpc_handler = PVPCData(session=session, tariff="2.0TD")
    esios_data = await pvpc_handler.async_update_all(
        current_data=None, now=datetime.utcnow()
    )
print(esios_data.sensors["PVPC"])

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

aiopvpc-4.3.1.tar.gz (13.0 kB view hashes)

Uploaded Source

Built Distribution

aiopvpc-4.3.1-py3-none-any.whl (14.9 kB view hashes)

Uploaded Python 3

Supported by

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