def get_database_engine_options(kwargs):
 conversions = {'convert_unicode': string_as_bool, 'pool_timeout': int, 'echo': string_as_bool, 'echo_pool': string_as_bool, 'pool_recycle': int, 'pool_size': int, 'max_overflow': int, 'pool_threadlocal': string_as_bool}
 prefix = 'database_engine_option_'
 prefix_len = len(prefix)
 rval = {}
 for (key, value) in kwargs.items():
  if key.startswith(prefix):
   key = key[prefix_len:]
   if (key in conversions):
    value = conversions[key](value)
   rval[key] = value
 return rval

def get_database_engine_options ( kwargs ) : conversions = { 'convert_unicode' : string_as_bool , 'pool_timeout' : int , 'echo' : string_as_bool , 'echo_pool' : string_as_bool , 'pool_recycle' : int , 'pool_size' : int , 'max_overflow' : int , 'pool_threadlocal' : string_as_bool } prefix = 'database_engine_option_' prefix_len = len ( prefix ) rval = { } for ( key , value ) in kwargs . items ( ) : if key . startswith ( prefix ) : key = key [ prefix_len : ] if ( key in conversions ) : value = conversions [ key ] ( value ) rval [ key ] = value return rval
allow options for the sqlalchemy database engine to be passed by using the prefix "database_engine_option" .