def parameterized_config(template):
 FERNET_KEY = generate_fernet_key()
 all_vars = {k: v for d in [globals(), locals()] for (k, v) in d.items()}
 return template.format(**all_vars)

def parameterized_config ( template ) : FERNET_KEY = generate_fernet_key ( ) all_vars = { k : v for d in [ globals ( ) , locals ( ) ] for ( k , v ) in d . items ( ) } return template . format ( ** all_vars )
generates a configuration from the provided template + variables defined in current scope .