def get_column_name(column):
 try:
  inspected_column = inspect(column)
 except NoInspectionAvailable:
  return column
 else:
  return inspected_column.key

def get_column_name ( column ) : try : inspected_column = inspect ( column ) except NoInspectionAvailable : return column else : return inspected_column . key
retrieve a column name from a column attribute of sqlalchemy model class .