Adding the tablename and a primary key to the class solves your issue
class SpamModel(Base): __tablename__ = 'spam' id: Mapped[int] = mapped_column(Integer(), primary_key=True)
NotImplementedError