merge_machine/api.py
def _parse_request():
    '''
    Separates data information from parameters and assures that values in data
    parameters are safe
    '''
    # Parse json request
    data_params = None
    module_params = None
    if request.json:
        req = request.json
        assert isinstance(req, dict)
    
        print(req)
    
        if 'data_params' in req:
            data_params = req['data_params']
            
            # Make paths secure
            for key, value in data_params.items():
                data_params[key] = secure_filename(value)
            
        if 'module_params' in req:
            module_params = req['module_params']
    
    return data_params, module_params

    Separates data information from parameters and assures that values in data
    parameters are safe
    
Separates data information from parameters and assures that values in data
parameters are safe
Separates data information from parameters and assures that values in data parameters are safe
def _parse_request():
    data_params = None
    module_params = None
    if request.json:
        req = request.json
        assert isinstance(req, dict)
        print(req)
        if 'data_params' in req:
            data_params = req['data_params']
            for key, value in data_params.items():
                data_params[key] = secure_filename(value)
        if 'module_params' in req:
            module_params = req['module_params']
    return data_params, module_params
def _parse_request ( ) : data_params = None module_params = None if request . json : req = request . json assert isinstance ( req , dict ) print ( req ) if 'data_params' in req : data_params = req [ 'data_params' ] for key , value in data_params . items ( ) : data_params [ key ] = secure_filename ( value ) if 'module_params' in req : module_params = req [ 'module_params' ] return data_params , module_params
Separates data information from parameters and assures that values in data
parameters are safe
Separates data information from parameters and assures that values in data parameters are safe
'''
    Separates data information from parameters and assures that values in data
    parameters are safe
    ''' # Parse json request # Make paths secure