Metadata-Version: 2.4
Name: fastapi-radar
Version: 0.1.1
Summary: A debugging dashboard for FastAPI applications with real-time monitoring
Home-page: https://github.com/doganarif/fastapi-radar
Author: Arif Dogan
Author-email: Arif Dogan <me@arif.sh>
License-Expression: MIT
Project-URL: Homepage, https://github.com/doganarif/fastapi-radar
Project-URL: Bug Reports, https://github.com/doganarif/fastapi-radar/issues
Project-URL: Source, https://github.com/doganarif/fastapi-radar
Keywords: fastapi,debugging,monitoring,dashboard,development-tools
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Framework :: FastAPI
Classifier: Topic :: Software Development :: Debuggers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.68.0
Requires-Dist: sqlalchemy>=1.4.0
Requires-Dist: pydantic>=1.8.0
Requires-Dist: starlette>=0.14.2
Requires-Dist: black>=24.8.0
Requires-Dist: httpx>=0.28.1
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
Requires-Dist: uvicorn[standard]>=0.15.0; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: isort>=5.10.0; extra == "dev"
Requires-Dist: flake8>=4.0.0; extra == "dev"
Requires-Dist: mypy>=0.950; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# FastAPI Radar 🛰️

[![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/downloads/)
[![FastAPI](https://img.shields.io/badge/FastAPI-0.68.0%2B-green.svg)](https://fastapi.tiangolo.com)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

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

## Installation

```bash
pip install fastapi-radar
```

Or with your favorite package manager:

```bash
# 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

```python
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

<!-- Add screenshots here -->

## Configuration

```python
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](CONTRIBUTING.md) for details.

### Development Setup

For contributors who want to modify the codebase:

1. Clone the repository:

```bash
git clone https://github.com/doganarif/fastapi-radar.git
cd fastapi-radar
```

2. Install development dependencies:

```bash
pip install -e ".[dev]"
```

3. (Optional) If modifying the dashboard UI:

```bash
cd fastapi_radar/dashboard
npm install
npm run dev  # For development with hot reload
# or
npm run build  # To rebuild the production bundle
```

4. Run the example app:

```bash
python example_app.py
```

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Acknowledgments

- Built with [FastAPI](https://fastapi.tiangolo.com/)
- Dashboard powered by [React](https://react.dev/) and [shadcn/ui](https://ui.shadcn.com/)
