run.py
def Set_dataset():
    """
    Post call to set active dataset in dataset.json
    """
    output = {}

    #retrieve the json from the ajax call
    jsonFile = ''
    if request.method == 'POST':
        jsonFile = request.json
        print ("post request")

    #if jsonFile successfully posted..
    if jsonFile != '':
        # check all required arguments are present:
        if not all(arg in jsonFile for arg in ["dataset"]):
            print("Missing arguments in post request")
            return json.dumps({"status":"Error", "messages":"Missing arguments"}), 422
        inputDataset = jsonFile["dataset"]
        print("retreived data: " + str(inputDataset)  )

    #call update datasets.json file
    return json.dumps(dataset.Set_dataset(inputDataset))

    Post call to set active dataset in dataset.json
    
Post call to set active dataset in dataset.json
Post call to set active dataset in dataset . json
def Set_dataset():
    output = {}
    jsonFile = ''
    if request.method == 'POST':
        jsonFile = request.json
        print ("post request")
    if jsonFile != '':
        if not all(arg in jsonFile for arg in ["dataset"]):
            print("Missing arguments in post request")
            return json.dumps({"status":"Error", "messages":"Missing arguments"}), 422
        inputDataset = jsonFile["dataset"]
        print("retreived data: " + str(inputDataset)  )
    return json.dumps(dataset.Set_dataset(inputDataset))
def Set_dataset ( ) : output = { } jsonFile = '' if request . method == 'POST' : jsonFile = request . json print ( "post request" ) if jsonFile != '' : if not all ( arg in jsonFile for arg in [ "dataset" ] ) : print ( "Missing arguments in post request" ) return json . dumps ( { "status" : "Error" , "messages" : "Missing arguments" } ) , 422 inputDataset = jsonFile [ "dataset" ] print ( "retreived data: " + str ( inputDataset ) ) return json . dumps ( dataset . Set_dataset ( inputDataset ) )
Post call to set active dataset in dataset.json
Post call to set active dataset in dataset . json
"""
    Post call to set active dataset in dataset.json
    """ #retrieve the json from the ajax call #if jsonFile successfully posted.. # check all required arguments are present: #call update datasets.json file