这个bottle-sqlalchemy插件将SQLAlchemy与您的Bottle应用程序集成在一起。 它会在您的路由中注入一个SQLAlchemy会话并处理会话周期。 用法示例: import bottle from bottle import HTTPError from bottle . ext import sqlalchemy from sqlalchemy import create_engine , Column , Integer , Sequence , String from sqlalchemy . ext . declarative import declarative_base Base = declarative_base () engine = create_engine ( 'sqlite:///:memory:' , echo = True ) ap