class IterableBase(object): """Base Model Class used to add iterable behavior """ def dict(cls): """Dict of a model Args: cls (object): reference to declarative base Return: dict: reprsentation of model """ model_dict = {} for column in cls.__table__.columns: model_dict[column.name] = str(getattr(cls, column.name)) return model_dict