from sqlalchemy import Column, Integer, String, create_engine from sqlalchemy.ext.declarative import declarative_base # 创建一个基类 Base = declarative_base() class Keyword(Base): __tablename__ = 'Keyword' id = Column(Integer, primary_key=True, autoincrement=True) region = Column(String(255), nullable=False) word = Column(String(255), nullable=False)