An unofficial class to interact with the Seas-NVE API
Project description
PySeasNVE
An unofficial class to interact (read only) with the Seas-NVE API
You’ll need to own an account over at https://seas-nve.dk/
Free software: GNU General Public License v3
Documentation: https://pyseasnve.readthedocs.io.
Features
Current pricing & climate stats
Forecasts for pricing and climate stats
The next cheapest/greenest period (for any given intervals)
TODO:
Billing stats?
Long-term stats (i.e. weekly/monthly/yearly usage)
Possibility to set configuration values via the API
Usage
# Login
>>> from pyseasnve import PySeasNVE
>>> seas = PySeasNVE('test@email.com', 'secretPassword')
# Current price + climate stats
>>> seas.current_price()
1.68 # DKK/kwh
>>> seas.current_green_energy()
75.68 # %
>>> seas.current_co2_intensity()
188 # unknown unit
# Next two cheapest 4-hour intervals
>>> seas.cheapest_interval(4, 2)
[{'start_time': '2022-03-20T12:00:00', 'interval_hours': 4, 'interval_avg_kwh_price': 1.59, 'interval_avg_kwh_price_estimate': False, 'interval_avg_green_energy_percent': 75.68, 'interval_avg_green_energy_percent_estimate': False}, {'start_time': '2022-03-20T11:00:00', 'interval_hours': 4, 'interval_avg_kwh_price': 1.6, 'interval_avg_kwh_price_estimate': False, 'interval_avg_green_energy_percent': 75.68, 'interval_avg_green_energy_percent_estimate': False}]
# Next greenest 1-hour interval
>>> seas.greenest_interval(1, 1)
[{'start_time': '2022-03-20T12:00:00', 'interval_hours': 1, 'interval_avg_kwh_price': 1.57, 'interval_avg_kwh_price_estimate': False, 'interval_avg_green_energy_percent': 75.68, 'interval_avg_green_energy_percent_estimate': False}]
# Or simply use the "best" method, depending on your motivation in SEAS-NVE
>>> seas.best_interval()
[{'start_time': '2022-03-20T12:00:00', 'interval_hours': 1, 'interval_avg_kwh_price': 1.57, 'interval_avg_kwh_price_estimate': False, 'interval_avg_green_energy_percent': 75.68, 'interval_avg_green_energy_percent_estimate': False}, {'start_time': '2022-03-20T13:00:00', 'interval_hours': 1, 'interval_avg_kwh_price': 1.57, 'interval_avg_kwh_price_estimate': False, 'interval_avg_green_energy_percent': 75.68, 'interval_avg_green_energy_percent_estimate': False}, {'start_time': '2022-03-20T14:00:00', 'interval_hours': 1, 'interval_avg_kwh_price': 1.57, 'interval_avg_kwh_price_estimate': False, 'interval_avg_green_energy_percent': 75.68, 'interval_avg_green_energy_percent_estimate': False}]
You can access the forecasts directly aswell, to write you own wrapper code around it. If you find something is missing, please raise an issue or submit the code :-)
>>> seas.forecast_price()
# output not shown
>>> seas.forecast_climate()
# output not shown
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2022-03-15)
First release on PyPI.
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
Built Distribution
Hashes for pyseasnve-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc1e067ad493acbbad0a3c61a0e6ce0212f26f5c9e23ae5344f942cdc1eb1b0a |
|
MD5 | d498cd6d8358b6c036ecea0199b89b13 |
|
BLAKE2b-256 | bbeb395aac3d050f0253d9e4b9d2931b898f03130a49b67a268c6bb2624696e4 |