def get_within_delta(key, app=None):
 txt = config_value(key, app=app)
 values = txt.split()
 return timedelta(**{values[1]: int(values[0])})

def get_within_delta ( key , app = None ) : txt = config_value ( key , app = app ) values = txt . split ( ) return timedelta ( ** { values [ 1 ] : int ( values [ 0 ] ) } )
get a timedelta object from the application configuration following the internal convention of:: <amount of units> <type of units> examples of valid config values:: 5 days 10 minutes .