app.py 588 Bytes
Newer Older
1
from flask import Flask
Zach Osman's avatar
Zach Osman committed
2
from flask import Response
3
from parscript import load_data
4
from getconnectedscript import load_getconn_data
5
import json
6

7 8
app = Flask(__name__)

9
@app.route("/25Live")
10
def display_data():
Zach Osman's avatar
Zach Osman committed
11 12 13
    resp = Response(json.dumps(load_data(), ensure_ascii=False).encode('utf-8'))
    resp.headers['Content-Type'] = 'application/json; charset=utf-8'
    return resp
14 15 16 17 18 19

@app.route("/getconn")
def display_GC_data():
	resp = Response(json.dumps(load_getconn_data(), ensure_ascii=False).encode('utf-8'))
	resp.headers['Content-Type'] = 'application/json; charset=utf-8'
	return resp