def _engine_builder(con):
 global _SQLALCHEMY_INSTALLED
 if isinstance(con, string_types):
  try:
   import sqlalchemy
  except ImportError:
   _SQLALCHEMY_INSTALLED = False
  else:
   con = sqlalchemy.create_engine(con)
   return con
 return con

def _engine_builder ( con ) : global _SQLALCHEMY_INSTALLED if isinstance ( con , string_types ) : try : import sqlalchemy except ImportError : _SQLALCHEMY_INSTALLED = False else : con = sqlalchemy . create_engine ( con ) return con return con
returns a sqlalchemy engine from a uri else it just return con without modifying it .