REST api wrapper for nordpool average daily spot prices
Project description
Python package for querying nordpool for average daily prices. Prices can only be obtained for the current year and the previous year. Incremet is how much you need to add to the price if you chargeback someone per kWh. It's optional and the default is zero
Supported areacode's | Suported currency's | Increment |
---|---|---|
"SE1" |
"SEK" |
"0.15" |
"SE2" |
"EUR" |
|
"SE3" |
||
"SE4" |
||
"NO1" |
||
"NO2" |
||
"NO3" |
||
"NO4" |
||
"NO5" |
||
"FI" |
||
"DK1" |
||
"DK2" |
EMAIL_RECEIVERS is a list like this ["person1@domain.com","person2@gmail.com","person3@hotmail.com"] or it can be just one user
Environment variables | Usage | Required | Syntax | Comment |
---|---|---|---|---|
LOGLEVEL | stdout logging level | No | DEBUG | Defaults to INFO if not used |
EMAIL_HOST | host for outgoing emails | No | "myhost@acme.com" | If not existing no email error sending, port is 25 |
EMAIL_SUBJECT | Subject in email | Yes if EMAIL_HOST | "Something went wrong" | What will in the subject for the email |
EMAIL_SENDER | Who will be sender | Yes if EMAIL_HOST | "first.last@acme.com" | Which email address will be sender |
EMAIL_RECEIVERS | Who will reseive the mail | Yes if EMAIL_HOST | See above | Who will receive the email(s) |
#*Usage:
pip install nordpool-daily-averages
#Getting average price for 2024-08-30, for areacode SE3 and in Euro and 15 cents is added to the prices
from nordpool import Prices as p
#instantiate class
price = p("SE3", "EUR", "0.15")
#Get the price
price.get_prices_for_one_date("2024-08-30")
#Getting average price for 2024-08-29 for areacode SE3 in SEK and 15 öre is added to the prices
from nordpool import Prices as p
#instantiate class
price = p("SE3", "SEK", "0.15")
#Get the price
price.get_prices_for_one_date("2024-08-29")
#Getting average price for 2024-08-28 for areacode SE2 in SEK and no increment is added to the prices
from nordpool import Prices as p
#instantiate class
price = p("SE2", "SEK")
#Get the price
price.get_prices_for_one_date("2024-08-28")
#Getting all price's for current year and last year for areacode SE2 in SEK and no increment is added to the prices
from nordpool import Prices as p
#instantiate class
price = p("SE2", "SEK")
#Get all price's
price.get_all_prices()
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
File details
Details for the file nordpool_daily_averages-1.1.20.tar.gz
.
File metadata
- Download URL: nordpool_daily_averages-1.1.20.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d291aa453da17ad5a1eb99616c714be6207969f2bb61ffda8b4265af7d9d9d8f |
|
MD5 | 99c72b4f2687a3dc1fe2f8146174252f |
|
BLAKE2b-256 | fd64e811c0689d89ecda91c657f07e468c7a54685ed0c14a69b2866f9a6b7628 |
File details
Details for the file nordpool_daily_averages-1.1.20-py3-none-any.whl
.
File metadata
- Download URL: nordpool_daily_averages-1.1.20-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1aa1774a840e3d231f148b7bfd9f0bd1c49f6ab4f730a8943885b8f154227e83 |
|
MD5 | b95a99052049191ff318a62b6b164841 |
|
BLAKE2b-256 | aab7291623fb0a5c60e330986d5754c19c85322c337ee6d137e6a57cddac64e2 |