class DeclarativeBaseToDict: def as_dict(self) -> dict: return {i: self.__dict__[i] for i in self.__dict__ if i[0] != '_'}