SQLAlchemy: 1.由于sqlalchemy中没有提供choice方法,所以借助SQLAlchemy-Utils组件提供的choice方法 from sqlalchemy_utils import ChoiceType Base = declarative_base() class Xuan(Base): __tablename__ = 'xuan' types_choices = ( (1,'欧美'), (2,'日韩'), (3,'老男孩'), ) id = Column(Intege…