fastapi-radar 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of fastapi-radar might be problematic. Click here for more details.

@@ -0,0 +1,105 @@
1
+ # Contributing to FastAPI Radar
2
+
3
+ Thank you for your interest in contributing to FastAPI Radar! We welcome contributions from the community.
4
+
5
+ ## Getting Started
6
+
7
+ 1. Fork the repository
8
+ 2. Clone your fork:
9
+
10
+ ```bash
11
+ git clone https://github.com/your-username/fastapi-radar.git
12
+ cd fastapi-radar
13
+ ```
14
+
15
+ 3. Create a virtual environment:
16
+
17
+ ```bash
18
+ python -m venv venv
19
+ source venv/bin/activate # On Windows: venv\Scripts\activate
20
+ ```
21
+
22
+ 4. Install dependencies:
23
+
24
+ ```bash
25
+ pip install -e ".[dev]"
26
+ ```
27
+
28
+ 5. Build the dashboard:
29
+ ```bash
30
+ cd fastapi_radar/dashboard
31
+ npm install
32
+ npm run build
33
+ cd ../..
34
+ ```
35
+
36
+ ## Development Workflow
37
+
38
+ 1. Create a new branch for your feature or fix:
39
+
40
+ ```bash
41
+ git checkout -b feature/your-feature-name
42
+ ```
43
+
44
+ 2. Make your changes and test them with the example app:
45
+
46
+ ```bash
47
+ python example_app.py
48
+ ```
49
+
50
+ 3. Run tests:
51
+
52
+ ```bash
53
+ pytest
54
+ ```
55
+
56
+ 4. Format your code:
57
+
58
+ ```bash
59
+ black fastapi_radar/
60
+ isort fastapi_radar/
61
+ ```
62
+
63
+ 5. Submit a pull request
64
+
65
+ ## Code Style
66
+
67
+ - Follow PEP 8
68
+ - Use Black for formatting
69
+ - Use isort for import sorting
70
+ - Add type hints where appropriate
71
+ - Write docstrings for public functions and classes
72
+
73
+ ## Dashboard Development
74
+
75
+ The dashboard is built with React, TypeScript, and Vite:
76
+
77
+ ```bash
78
+ cd fastapi_radar/dashboard
79
+ npm run dev # Start development server
80
+ npm run build # Build for production
81
+ ```
82
+
83
+ ## Testing
84
+
85
+ - Write tests for new features
86
+ - Ensure all tests pass before submitting PR
87
+ - Maintain or improve code coverage
88
+
89
+ ## Reporting Issues
90
+
91
+ - Use GitHub Issues for bug reports and feature requests
92
+ - Provide clear reproduction steps for bugs
93
+ - Include relevant system information
94
+
95
+ ## Pull Request Process
96
+
97
+ 1. Update documentation for any new features
98
+ 2. Ensure your branch is up to date with main
99
+ 3. Write clear commit messages
100
+ 4. Reference any related issues in your PR description
101
+ 5. Be responsive to code review feedback
102
+
103
+ ## License
104
+
105
+ By contributing, you agree that your contributions will be licensed under the MIT License.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Arif Dogan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,7 @@
1
+ include README.md
2
+ include LICENSE
3
+ include CONTRIBUTING.md
4
+ recursive-include fastapi_radar/dashboard/dist *
5
+ recursive-exclude * __pycache__
6
+ recursive-exclude * *.py[co]
7
+ recursive-exclude * .DS_Store
@@ -0,0 +1,165 @@
1
+ Metadata-Version: 2.4
2
+ Name: fastapi-radar
3
+ Version: 0.1.0
4
+ Summary: A debugging dashboard for FastAPI applications with real-time monitoring
5
+ Home-page: https://github.com/doganarif/fastapi-radar
6
+ Author: Arif Dogan
7
+ Author-email: Arif Dogan <me@arif.sh>
8
+ License-Expression: MIT
9
+ Project-URL: Homepage, https://github.com/doganarif/fastapi-radar
10
+ Project-URL: Bug Reports, https://github.com/doganarif/fastapi-radar/issues
11
+ Project-URL: Source, https://github.com/doganarif/fastapi-radar
12
+ Keywords: fastapi,debugging,monitoring,dashboard,development-tools
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.8
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Framework :: FastAPI
22
+ Classifier: Topic :: Software Development :: Debuggers
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Requires-Python: >=3.8
25
+ Description-Content-Type: text/markdown
26
+ License-File: LICENSE
27
+ Requires-Dist: fastapi>=0.68.0
28
+ Requires-Dist: sqlalchemy>=1.4.0
29
+ Requires-Dist: pydantic>=1.8.0
30
+ Requires-Dist: starlette>=0.14.2
31
+ Requires-Dist: black>=24.8.0
32
+ Requires-Dist: httpx>=0.28.1
33
+ Provides-Extra: dev
34
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
35
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
36
+ Requires-Dist: uvicorn[standard]>=0.15.0; extra == "dev"
37
+ Requires-Dist: black>=22.0.0; extra == "dev"
38
+ Requires-Dist: isort>=5.10.0; extra == "dev"
39
+ Requires-Dist: flake8>=4.0.0; extra == "dev"
40
+ Requires-Dist: mypy>=0.950; extra == "dev"
41
+ Dynamic: author
42
+ Dynamic: home-page
43
+ Dynamic: license-file
44
+ Dynamic: requires-python
45
+
46
+ # FastAPI Radar 🛰️
47
+
48
+ [![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/downloads/)
49
+ [![FastAPI](https://img.shields.io/badge/FastAPI-0.68.0%2B-green.svg)](https://fastapi.tiangolo.com)
50
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
51
+
52
+ **A debugging dashboard for FastAPI applications providing real-time request, database query, and exception monitoring.**
53
+
54
+ ## Installation
55
+
56
+ ```bash
57
+ pip install fastapi-radar
58
+ ```
59
+
60
+ Or with your favorite package manager:
61
+
62
+ ```bash
63
+ # Using poetry
64
+ poetry add fastapi-radar
65
+
66
+ # Using pipenv
67
+ pipenv install fastapi-radar
68
+ ```
69
+
70
+ **Note:** The dashboard comes pre-built! No need to build anything - just install and use.
71
+
72
+ ## Quick Start
73
+
74
+ ```python
75
+ from fastapi import FastAPI
76
+ from fastapi_radar import Radar
77
+ from sqlalchemy import create_engine
78
+
79
+ app = FastAPI()
80
+ engine = create_engine("sqlite:///./app.db")
81
+
82
+ # Initialize Radar - automatically adds middleware and mounts dashboard
83
+ radar = Radar(app, db_engine=engine)
84
+ radar.create_tables()
85
+
86
+ # Your routes work unchanged
87
+ @app.get("/users")
88
+ async def get_users():
89
+ return {"users": []}
90
+ ```
91
+
92
+ Access your dashboard at: **http://localhost:8000/\_\_radar**
93
+
94
+ ## Features
95
+
96
+ - 🚀 **Zero Configuration** - Works with any FastAPI + SQLAlchemy app
97
+ - 📊 **Request Monitoring** - Complete HTTP request/response capture with timing
98
+ - 🗃️ **Database Monitoring** - SQL query logging with execution times
99
+ - 🐛 **Exception Tracking** - Automatic exception capture with stack traces
100
+ - ⚡ **Real-time Updates** - Live dashboard updates as requests happen
101
+ - 🎨 **Beautiful UI** - Modern React dashboard with shadcn/ui components
102
+
103
+ ## Screenshots
104
+
105
+ <!-- Add screenshots here -->
106
+
107
+ ## Configuration
108
+
109
+ ```python
110
+ radar = Radar(
111
+ app,
112
+ db_engine=engine,
113
+ dashboard_path="/__radar", # Custom dashboard path
114
+ enable_in_production=False, # Disable in production
115
+ capture_body=True, # Capture request/response bodies
116
+ capture_headers=True, # Capture headers
117
+ max_body_size=10000, # Max body size to capture
118
+ )
119
+ ```
120
+
121
+ ## Contributing
122
+
123
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
124
+
125
+ ### Development Setup
126
+
127
+ For contributors who want to modify the codebase:
128
+
129
+ 1. Clone the repository:
130
+
131
+ ```bash
132
+ git clone https://github.com/doganarif/fastapi-radar.git
133
+ cd fastapi-radar
134
+ ```
135
+
136
+ 2. Install development dependencies:
137
+
138
+ ```bash
139
+ pip install -e ".[dev]"
140
+ ```
141
+
142
+ 3. (Optional) If modifying the dashboard UI:
143
+
144
+ ```bash
145
+ cd fastapi_radar/dashboard
146
+ npm install
147
+ npm run dev # For development with hot reload
148
+ # or
149
+ npm run build # To rebuild the production bundle
150
+ ```
151
+
152
+ 4. Run the example app:
153
+
154
+ ```bash
155
+ python example_app.py
156
+ ```
157
+
158
+ ## License
159
+
160
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
161
+
162
+ ## Acknowledgments
163
+
164
+ - Built with [FastAPI](https://fastapi.tiangolo.com/)
165
+ - Dashboard powered by [React](https://react.dev/) and [shadcn/ui](https://ui.shadcn.com/)
@@ -0,0 +1,120 @@
1
+ # FastAPI Radar 🛰️
2
+
3
+ [![Python Version](https://img.shields.io/badge/python-3.8%2B-blue.svg)](https://www.python.org/downloads/)
4
+ [![FastAPI](https://img.shields.io/badge/FastAPI-0.68.0%2B-green.svg)](https://fastapi.tiangolo.com)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
+
7
+ **A debugging dashboard for FastAPI applications providing real-time request, database query, and exception monitoring.**
8
+
9
+ ## Installation
10
+
11
+ ```bash
12
+ pip install fastapi-radar
13
+ ```
14
+
15
+ Or with your favorite package manager:
16
+
17
+ ```bash
18
+ # Using poetry
19
+ poetry add fastapi-radar
20
+
21
+ # Using pipenv
22
+ pipenv install fastapi-radar
23
+ ```
24
+
25
+ **Note:** The dashboard comes pre-built! No need to build anything - just install and use.
26
+
27
+ ## Quick Start
28
+
29
+ ```python
30
+ from fastapi import FastAPI
31
+ from fastapi_radar import Radar
32
+ from sqlalchemy import create_engine
33
+
34
+ app = FastAPI()
35
+ engine = create_engine("sqlite:///./app.db")
36
+
37
+ # Initialize Radar - automatically adds middleware and mounts dashboard
38
+ radar = Radar(app, db_engine=engine)
39
+ radar.create_tables()
40
+
41
+ # Your routes work unchanged
42
+ @app.get("/users")
43
+ async def get_users():
44
+ return {"users": []}
45
+ ```
46
+
47
+ Access your dashboard at: **http://localhost:8000/\_\_radar**
48
+
49
+ ## Features
50
+
51
+ - 🚀 **Zero Configuration** - Works with any FastAPI + SQLAlchemy app
52
+ - 📊 **Request Monitoring** - Complete HTTP request/response capture with timing
53
+ - 🗃️ **Database Monitoring** - SQL query logging with execution times
54
+ - 🐛 **Exception Tracking** - Automatic exception capture with stack traces
55
+ - ⚡ **Real-time Updates** - Live dashboard updates as requests happen
56
+ - 🎨 **Beautiful UI** - Modern React dashboard with shadcn/ui components
57
+
58
+ ## Screenshots
59
+
60
+ <!-- Add screenshots here -->
61
+
62
+ ## Configuration
63
+
64
+ ```python
65
+ radar = Radar(
66
+ app,
67
+ db_engine=engine,
68
+ dashboard_path="/__radar", # Custom dashboard path
69
+ enable_in_production=False, # Disable in production
70
+ capture_body=True, # Capture request/response bodies
71
+ capture_headers=True, # Capture headers
72
+ max_body_size=10000, # Max body size to capture
73
+ )
74
+ ```
75
+
76
+ ## Contributing
77
+
78
+ We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
79
+
80
+ ### Development Setup
81
+
82
+ For contributors who want to modify the codebase:
83
+
84
+ 1. Clone the repository:
85
+
86
+ ```bash
87
+ git clone https://github.com/doganarif/fastapi-radar.git
88
+ cd fastapi-radar
89
+ ```
90
+
91
+ 2. Install development dependencies:
92
+
93
+ ```bash
94
+ pip install -e ".[dev]"
95
+ ```
96
+
97
+ 3. (Optional) If modifying the dashboard UI:
98
+
99
+ ```bash
100
+ cd fastapi_radar/dashboard
101
+ npm install
102
+ npm run dev # For development with hot reload
103
+ # or
104
+ npm run build # To rebuild the production bundle
105
+ ```
106
+
107
+ 4. Run the example app:
108
+
109
+ ```bash
110
+ python example_app.py
111
+ ```
112
+
113
+ ## License
114
+
115
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
116
+
117
+ ## Acknowledgments
118
+
119
+ - Built with [FastAPI](https://fastapi.tiangolo.com/)
120
+ - Dashboard powered by [React](https://react.dev/) and [shadcn/ui](https://ui.shadcn.com/)
@@ -0,0 +1,6 @@
1
+ """FastAPI Radar - Debugging dashboard for FastAPI applications."""
2
+
3
+ from .radar import Radar
4
+
5
+ __version__ = "0.1.0"
6
+ __all__ = ["Radar"]