Skip to main content

A debug toolbar for FastAPI.

Project description

FastAPI Debug Toolbar

FastAPI Debug Toolbar

🐞A debug toolbar for FastAPI based on the original django-debug-toolbar.🐞
Swagger UI & GraphQL are supported.

Test Coverage Codacy Package version


Documentation: https://fastapi-debug-toolbar.domake.io


Installation

pip install fastapi-debug-toolbar

Quickstart

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)

SQLAlchemy

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"],
)

Tortoise ORM

Add the TortoisePanel to your panel list:

app.add_middleware(
    DebugToolbarMiddleware,
    panels=["debug_toolbar.panels.tortoise.TortoisePanel"],
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapi_debug_toolbar-0.6.2.tar.gz (26.7 kB view hashes)

Uploaded Source

Built Distribution

fastapi_debug_toolbar-0.6.2-py3-none-any.whl (42.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page