Skip to content

Commit b8df5c8

Browse files
author
Vasily Fotin
committed
Store results to file
1 parent ef5d5ce commit b8df5c8

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/routes/formatted.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from ..data import get_data
44
from cachetools import cached, TTLCache
55

6-
76
@app.route('/formatted')
87
@cached(cache=TTLCache(maxsize=1024, ttl=900))
98
def full():
@@ -48,4 +47,10 @@ def full():
4847
# add current location to the output
4948
output.append(locationOutput)
5049

50+
outputJSON = jsonify(output)
51+
52+
f = open( 'data.json', 'w' )
53+
f.write(str(output))
54+
f.close()
55+
5156
return jsonify(output)

0 commit comments

Comments
 (0)