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.0.tar.gz (164.3 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.0-py3-none-any.whl (163.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fastapi_radar-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f3a1579c93751632902f733d8ef9509967c4e7a31dd1ac81e80f3fa5abcb7e7a
MD5 16d72afddccb1096dcd0761635a0621e
BLAKE2b-256 d1739ff1a687bb5ee69404041d4ebc93ca46333703cdf4b0517f68d6a601a2a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastapi_radar-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7074c6e48200515595b297bf33c7b9631e15118c4158f566ad0a38a4b06b7943
MD5 bb1a39d59e4a5c2b7c08117cd6e12f97
BLAKE2b-256 cfa96bb984be2248118415fd5d325ec1c93a6d5e5908f73b86761b09d88a86fb

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