Dashboard¶
build_dashboard_app() creates a small FastAPI application for inspecting stored events.
Features¶
/renders an HTML dashboard of the most recent events (200 by default, set withmax_page_events)/eventsreturns structured event dataDELETE /eventsclears the store/healthreports service health
Storage¶
The dashboard works with any object that implements the EventStore protocol.
from fastapi_inspector.dashboard import build_dashboard_app
from fastapi_inspector.storage import InMemoryEventStore
app = build_dashboard_app(InMemoryEventStore())
Notes¶
- The dashboard is intentionally lightweight
- It is useful for local inspection and test fixtures
/events?limit=Nreturns the latestNevents; omitlimitto fetch all of them- For persistent dashboards, use
JsonFileEventStoreorSQLiteEventStore