diff options
-rwxr-xr-x | entsoe2pgsql.py | 13 |
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"}, |