<<少し特殊なユースケースです>> sqlalchemy.orm で declarative_base からクラス宣言形式で ORM を作る。 次のように User class を作って、num の初期値を 0 にしたい。 from sqlalchemy import create_engine from sqlalchemy import Column, Integer, text from sqlalchemy.ext.declarative import declarative_base engine = create_engine("sqlite:///:memory:", echo=True) Base = declarative_base() class User(Base): __tablename__="users" id = Column(Integer, primary