Retrieval of Spanish Electricity hourly prices (PVPC)
Project description
aiopvpc
Simple aio library to download Spanish electricity hourly prices.
Made to support the pvpc_hourly_pricing
HomeAssistant integration.
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
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
aiopvpc-4.3.1.tar.gz
(13.0 kB
view hashes)
Built Distribution
aiopvpc-4.3.1-py3-none-any.whl
(14.9 kB
view hashes)