Skip to main content

A debugging dashboard for FastAPI applications with real-time monitoring

Project description

FastAPI Radar 🛰️

Python Version FastAPI License: MIT

A debugging dashboard for FastAPI applications providing real-time request, database query, and exception monitoring.

Installation

pip install fastapi-radar

Or with your favorite package manager:

# Using poetry
poetry add fastapi-radar

# Using pipenv
pipenv install fastapi-radar

Note: The dashboard comes pre-built! No need to build anything - just install and use.

Quick Start

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

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

# Initialize Radar - automatically adds middleware and mounts dashboard
radar = Radar(app, db_engine=engine)
radar.create_tables()

# Your routes work unchanged
@app.get("/users")
async def get_users():
    return {"users": []}

Access your dashboard at: http://localhost:8000/\_\_radar/

Features

  • 🚀 Zero Configuration - Works with any FastAPI + SQLAlchemy app
  • 📊 Request Monitoring - Complete HTTP request/response capture with timing
  • 🗃️ Database Monitoring - SQL query logging with execution times
  • 🐛 Exception Tracking - Automatic exception capture with stack traces
  • Real-time Updates - Live dashboard updates as requests happen
  • 🎨 Beautiful UI - Modern React dashboard with shadcn/ui components

Screenshots

Configuration

radar = Radar(
    app,
    db_engine=engine,
    dashboard_path="/__radar",  # Custom dashboard path
    enable_in_production=False,  # Disable in production
    capture_body=True,           # Capture request/response bodies
    capture_headers=True,        # Capture headers
    max_body_size=10000,        # Max body size to capture
)

Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

For contributors who want to modify the codebase:

  1. Clone the repository:
git clone https://github.com/doganarif/fastapi-radar.git
cd fastapi-radar
  1. Install development dependencies:
pip install -e ".[dev]"
  1. (Optional) If modifying the dashboard UI:
cd fastapi_radar/dashboard
npm install
npm run dev  # For development with hot reload
# or
npm run build  # To rebuild the production bundle
  1. Run the example app:
python example_app.py

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

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_radar-0.1.2.tar.gz (266.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastapi_radar-0.1.2-py3-none-any.whl (266.5 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_radar-0.1.2.tar.gz.

File metadata

  • Download URL: fastapi_radar-0.1.2.tar.gz
  • Upload date:
  • Size: 266.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.28

File hashes

Hashes for fastapi_radar-0.1.2.tar.gz
Algorithm Hash digest
SHA256 86d09f9cff92b473a151ed538d697a2196aa0ec1e89b48a2e6f73b8e6b8f3946
MD5 dab502e8d1651a6bb2c6396f0f637494
BLAKE2b-256 8de0c75e98142a45011b449eddde3f482437933053a8c0e8789d003ca1ac0849

See more details on using hashes here.

File details

Details for the file fastapi_radar-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_radar-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 df3bc908b6da157f227186af0ed0f7cb7b8a4987e8ac0f0fcc65f7a30005f182
MD5 21be310657c823ae04b0978e750b7d41
BLAKE2b-256 c35ad40288ec642bc83c5a361a64e4cdc9850d390e5503032a641d8e60f6edb2

See more details on using hashes here.

Supported by

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