'Populates any simple (string or number) attributes from a dict'

def update_from_dict(self, update_dict):

    for col in self.__table__.columns:
        if isinstance(update_dict.get(col.name), (basestring, int, float)):
            setattr(self, col.name, update_dict[col.name])
