Closed kemalbastak closed 9 months ago
Hey @kemalbastak , you can create a custom panel based on SQLAlchemyPanel
:
from debug_toolbar.panels.sqlalchemy import SQLAlchemyPanel
from fastapi import Request
from sqlmodel import create_engine
engine = create_engine("sqlite://")
class SQLModelPanel(SQLAlchemyPanel):
async def add_engines(self, request: Request):
self.engines.add(engine)
...and add this panel toDebugToolbarMiddleware
:
app.add_middleware(
DebugToolbarMiddleware,
panels=["path.to.SQLModelPanel"],
)
I close the issue, if you have any questions please let me know.
Is it possible to add SqlModel panel support for query monitoring