def get_filters_from_dict(data, attr_info, skips=None):
 skips = (skips or [])
 res = {}
 for (key, values) in data.items():
  if ((key in skips) or hasattr(model_base.BASEV2, key)):
   continue
  values = [v for v in values if v]
  key_attr_info = attr_info.get(key, {})
  if ('convert_list_to' in key_attr_info):
   values = key_attr_info['convert_list_to'](values)
  elif ('convert_to' in key_attr_info):
   convert_to = key_attr_info['convert_to']
   values = [convert_to(v) for v in values]
  if values:
   res[key] = values
 return res

def get_filters_from_dict ( data , attr_info , skips = None ) : skips = ( skips or [ ] ) res = { } for ( key , values ) in data . items ( ) : if ( ( key in skips ) or hasattr ( model_base . BASEV2 , key ) ) : continue values = [ v for v in values if v ] key_attr_info = attr_info . get ( key , { } ) if ( 'convert_list_to' in key_attr_info ) : values = key_attr_info [ 'convert_list_to' ] ( values ) elif ( 'convert_to' in key_attr_info ) : convert_to = key_attr_info [ 'convert_to' ] values = [ convert_to ( v ) for v in values ] if values : res [ key ] = values return res
extracts the filters from a dict of query parameters .