-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
35 lines (27 loc) · 820 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import os
from flask import Flask, send_file, render_template
import json
app = Flask(__name__)
@app.route('/')
def homepage():
return render_template('database.html')
#return send_file(os.path.join(app.config['/'], 'database.html'))
@app.route('/finder')
def finder():
filelist = ('2016B', '2017A', '2017B', '2018A')
data = []
for recordYear in filelist:
with open(recordYear+'J.json') as datarunner:
data1 = json.load(datarunner)
data.append(data1)
bigList = []
for entry in data:
#
if entry.get("Target") == "HR8799":
return(json.dumps(entry))
#return redirect(url_for('meme')
#return(json.dumps(data1[0]))
#print(data1)
#return('\n'.join('{}{}'.format(key, val) for key, val in data1[3].items()))
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0', port = 3000)