from flask import Flask, render_template, jsonify
from random import uniform
import time
+import configparser
+import os
app = Flask(__name__)
+config = configparser.ConfigParser()
+config.read(os.environ['SEEPARKINI'])
+apikey = config.get('openweathermap', 'apikey');
+
@app.route('/data/', defaults={'timespan': 1})
@app.route("/data/<int:timespan>", methods=['GET'])
def data(timespan):
@app.route("/")
def index():
- return render_template('seepark_web.html')
+ return render_template('seepark_web.html', apikey=apikey)