debug_toolbar.litestar.panels

Litestar-specific panels for the debug toolbar.

class debug_toolbar.litestar.panels.EventsPanel(toolbar)[source]

Panel displaying Litestar lifecycle events and handlers.

Shows: - Application lifecycle hooks (on_startup, on_shutdown) - Request lifecycle hooks (before_request, after_request, after_response) - Exception handlers registered at app/controller/route level - Execution timing for hooks that ran during the request

async generate_stats(context)[source]

Generate event statistics from context metadata.

Return type:

dict[str, Any]

get_nav_subtitle()[source]

Get the navigation subtitle.

Return type:

str

has_content: ClassVar[bool] = True
nav_title: ClassVar[str] = 'Events'
panel_id: ClassVar[str] = 'EventsPanel'
template: ClassVar[str] = 'panels/events.html'
title: ClassVar[str] = 'Events'
class debug_toolbar.litestar.panels.RoutesPanel(toolbar)[source]

Panel displaying Litestar application routes.

Shows: - All registered routes - HTTP methods for each route - Handler names - Route parameters

async generate_stats(context)[source]

Generate route statistics.

Return type:

dict[str, Any]

get_nav_subtitle()[source]

Get the navigation subtitle.

Return type:

str

has_content: ClassVar[bool] = True
nav_title: ClassVar[str] = 'Routes'
panel_id: ClassVar[str] = 'RoutesPanel'
template: ClassVar[str] = 'panels/routes.html'
title: ClassVar[str] = 'Routes'
class debug_toolbar.litestar.panels.StaticFilesPanel(toolbar)[source]

Panel displaying where an app’s static files are served from.

Shows the URL path and folder(s) on disk for every static file mount registered on the application (e.g. via create_static_files_router). It does not track which static files a specific page actually loaded.

async generate_stats(context)[source]

Generate static file mount statistics.

Return type:

dict[str, Any]

get_nav_subtitle()[source]

Get the navigation subtitle.

Return type:

str

has_content: ClassVar[bool] = True
nav_title: ClassVar[str] = 'Static files'
panel_id: ClassVar[str] = 'StaticFilesPanel'
template: ClassVar[str] = 'panels/static_files.html'
title: ClassVar[str] = 'Static files'