debug_toolbar.litestar.plugin¶
Debug toolbar plugin for Litestar.
Classes
|
Litestar plugin for the debug toolbar. |
- class debug_toolbar.litestar.plugin.DebugToolbarPlugin(config=None)[source]¶
Litestar plugin for the debug toolbar.
This plugin automatically configures the debug toolbar middleware and registers API routes for the toolbar interface.
Example:
from litestar import Litestar from debug_toolbar.litestar import DebugToolbarPlugin, LitestarDebugToolbarConfig config = LitestarDebugToolbarConfig( enabled=True, exclude_paths=["/health", "/metrics"], ) app = Litestar( route_handlers=[...], plugins=[DebugToolbarPlugin(config)], )
- __init__(config=None)[source]¶
Initialize the plugin.
- Parameters:
config (
LitestarDebugToolbarConfig|None) – Toolbar configuration. Uses defaults if not provided.
- property config: LitestarDebugToolbarConfig¶
Get the plugin configuration.
- property toolbar: DebugToolbar | None¶
Get the toolbar instance.