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
from datetime import datetime
from aiopvpc import PVPCData
pvpc_handler = PVPCData(tariff="discrimination", zone_ceuta_melilla=False)
start = datetime(2021, 5, 20, 22)
end = datetime(2021, 6, 7, 16)
prices_range: dict = await pvpc_handler.async_download_prices_for_range(start, end)
Check this example on a jupyter notebook, where the downloader is combined with pandas and matplotlib to plot the electricity prices.
To play with it, clone the repo and install the project with poetry install -E jupyter
, and then poetry run jupyter notebook
.
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-2.2.5rc1.tar.gz
(17.2 kB
view hashes)
Built Distribution
aiopvpc-2.2.5rc1-py3-none-any.whl
(18.8 kB
view hashes)
Close
Hashes for aiopvpc-2.2.5rc1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6d997a72507a57d0d66a27ab6e6fe58a6506944312ab74c4dbfeae2c2d0dd83 |
|
MD5 | 44f398094334fc23ba7e86015ccc95fc |
|
BLAKE2b-256 | 0217b7c48536a43d4b79787fe85fd707e198b64dab6996fe3be8f06fa28963a0 |