🐞A debug toolbar for FastAPI based on the original django-debug-toolbar.🐞
Swagger UI & GraphQL are supported.
Documentation: https://fastapi-debug-toolbar.domake.io
pip install fastapi-debug-toolbar
Add DebugToolbarMiddleware
middleware to your FastAPI application:
from debug_toolbar.middleware import DebugToolbarMiddleware
from fastapi import FastAPI
app = FastAPI(debug=True)
app.add_middleware(DebugToolbarMiddleware)
Please make sure to use the "Dependency Injection" system as described in the FastAPI docs and add the SQLAlchemyPanel
to your panel list:
app.add_middleware(
DebugToolbarMiddleware,
panels=["debug_toolbar.panels.sqlalchemy.SQLAlchemyPanel"],
)
Add the TortoisePanel
to your panel list:
app.add_middleware(
DebugToolbarMiddleware,
panels=["debug_toolbar.panels.tortoise.TortoisePanel"],
)