~ihabunek/flask_debugtoolbar_sqlalchemy

Flask debug toolbar panel for SQLAlchemy
Add changelog
Add progress bar to display duration
Use pygments to highlight sql code

clone

read-only
https://git.sr.ht/~ihabunek/flask_debugtoolbar_sqlalchemy
read/write
git@git.sr.ht:~ihabunek/flask_debugtoolbar_sqlalchemy

You can also use your local clone with git send-email.

#Flask debug toolbar SQLAlchemy panel

Similar to the builtin SQLAlchemy toolbar but does not require the Flask-SQLAlchemy extension.

Displayed in toolbar:

Toolbar view

Panel details:

Panel view

#Install

From the cheese shop:

pip install flask-debugtoolbar-sqlalchemy

#Setup

Bootstrap the toolbar as usual and add SQLAlchemyPanel to the list of panels.

from flask import Flask
from flask_debugtoolbar import DebugToolbarExtension

app = Flask(__name__)
app.debug = True

toolbar = DebugToolbarExtension(app)

app.config['DEBUG_TB_PANELS'] += (
    'flask_debugtoolbar_sqlalchemy.SQLAlchemyPanel',
)