def get(cls, todo_name): res = db.session.query(cls).\ filter(cls.todo_name == todo_name).first() if res: return res.to_dict() raise NotFoundResourceException( NOT_FOUND_RESOURCE_MESSAGE.format(cls.__name__, todo_name))