Skip to content
← All projects
Project system

FastAPI Radar

Real-time request, SQL query, exception, and trace dashboard for FastAPI apps.

What it does

FastAPI Radar mounts middleware, captures HTTP and database behavior, stores it in DuckDB by default, and exposes API/dashboard routes inside the app.

System map

  1. 1

    FastAPI App

    Routes stay unchanged

  2. 2

    Radar(app)

    Configures middleware and routes

  3. 3

    RadarMiddleware

    Requests, responses, exceptions

  4. 4

    QueryCapture

    SQLAlchemy events

  5. 5

    DuckDB Store

    Captured requests and traces

  6. 6

    Dashboard/API

    /__radar live view

FastAPI App

Routes stay unchanged

Codebase read

  • Radar adds a Starlette middleware that records request metadata, bodies, exceptions, and timings.
  • QueryCapture attaches SQLAlchemy before/after cursor listeners and connects queries back to request context.
  • The storage layer defaults to DuckDB and switches to memory under development reload to avoid file locks.

Key snippet

from fastapi import FastAPI
from fastapi_radar import Radar
from sqlalchemy import create_engine

app = FastAPI()
engine = create_engine("sqlite:///./app.db")

radar = Radar(app, db_engine=engine)
radar.create_tables()

Tech used

PythonFastAPIStarletteSQLAlchemyDuckDBPydanticTracing

Source paths inspected

fastapi_radar/radar.pymiddleware.pycapture.pytracing.pyapi.py

More project systems

GoVisualZero-config HTTP request visualizer for Go applications.
LLMDogTerminal UI for selecting code context and turning it into LLM-ready Markdown.
PromptPilotPrompt versioning and A/B testing across AI providers.
GIQAI-enhanced Git workflow assistant that keeps normal Git semantics intact.