aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDennis Eriksen <d@ennis.no>2022-10-04 06:25:31 +0200
committerDennis Eriksen <d@ennis.no>2022-10-04 06:25:31 +0200
commit2cad998a7482a26aeb10b1a771b9130c214ee95d (patch)
treeb0db80629022294aba1caa504be26006d5dcf175
parentAdding Entsoe as a data source. Also adding Norges Bank, since Entsoes (diff)
downloadenergyscripts-2cad998a7482a26aeb10b1a771b9130c214ee95d.tar.gz
Adding doc on how to obtain api-key from entsoe
-rwxr-xr-xentsoe2pgsql.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/entsoe2pgsql.py b/entsoe2pgsql.py
index ef99fca..8474184 100755
--- a/entsoe2pgsql.py
+++ b/entsoe2pgsql.py
@@ -14,7 +14,19 @@ from dateutil import tz
# variables
+
+# Getting an api-key isn't very well documented. The documentation [1] points
+# to a pdf [2], which says the following:
+# > In order to request the access to the Restful API, please register on the
+# > Transparency Platform and send an email to transparency@entsoe.eu with
+# > “Restful API access” in the subject line. Indicate the email address you
+# > entered during registration in the email body. We will make our best to
+# > respond to your request.
+# 1: https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html#_authentication_and_authorisation
+# 2: https://transparency.entsoe.eu/content/static_content/download?path=/Static%20content/API-Token-Management.pdf
apiKey = os.environ['entsoe_token']
+
+# https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html
apiUrl = "https://transparency.entsoe.eu/api?securityToken=" + apiKey
pg_db = os.environ['pg_db']
@@ -26,6 +38,7 @@ startTime = startTime.strftime('%Y%m%d')
endTime = datetime.now(get_localzone()).strftime('%Y%m%d')
+# https://transparency.entsoe.eu/content/static_content/Static%20content/web%20api/Guide.html#_areas
areas = [ {"name": "NO-0", "code": "10YNO-0--------C"},
{"name": "NO-1", "code": "10YNO-1--------2"},
{"name": "NO-2", "code": "10YNO-2--------T"},