@api.route('/api/geomance/', methods=['POST', 'GET'])
def geomance_api():

    field_defs = json.loads(request.data)
    if request.files:
        file_contents = request.files['input_file'].read()
        filename = request.files['input_file'].filename
    else:
        file_contents = flask_session['file']
        filename = flask_session['filename']
    session = do_the_work.delay(file_contents, field_defs, filename)
    resp = make_response(json.dumps({'session_key': session.key}))
    resp.headers['Content-Type'] = 'application/json'
    return resp
Needs to get the file as well which fields have 
dataset/ETHPy150Open associatedpress/geomancer/geomancer/api.py/geomance_api