据我所知要实现这个futer你必须改进sqlite方言来改变create_table行为.
但你可以使用这个快速但丑陋的解决方案“monkeypatching”
# ugly monkeypatch from sqlalchemy.dialects.sqlite.base import sqliteDDLCompiler old_create_table = sqliteDDLCompiler.visit_create_table def new_create_table(*args,**kwargs): sql = old_create_table(*args,**kwargs) # TODO # 1) check table with FTS3 # 2) change sql to CREATE VIRTUAL TABLE ... USING FTS3(tokenizer=...) print 'sql: %s' % sql return sql sqliteDDLCompiler.visit_create_table = new_create_table # end of ugly monkey patch from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import schema,MetaData,Column,Integer Metadata = MetaData() Base = declarative_base(Metadata=Metadata) class MyModel(Base): __tablename__ = 'table' id = Column(Integer,primary_key=True) if __name__ == '__main__': from sqlalchemy import create_engine engine = create_engine('sqlite:///',echo=True) Metadata.bind = engine Metadata.create_all()