Minimum working iterator version

Checkpointing. This is a minimum working version using the iterator. I basically hacked consuming the iterator since I want to switch directions, but this is a good place to come back to.
This commit is contained in:
Charlotte Weaver
2018-06-22 10:01:52 -07:00
parent fabd3ca2ff
commit 1621d20bc4
6 changed files with 74 additions and 32 deletions
+10 -1
View File
@@ -1,6 +1,6 @@
import json
from numpy import float32, integer
from flask import make_response, jsonify
from flask import make_response, jsonify, Response
class Float32JSONEncoder(json.JSONEncoder):
def default(self, obj):
@@ -31,4 +31,13 @@ def make_payload(data, errormessage="", errorcode=200):
}
}), errorcode)
def make_streaming_response(data_generator, errorcode=200, content_type="application/json"):
# TODO headers
return Response(data_generator, status=errorcode, content_type=content_type)