fastapi-radar 0.1.6__py3-none-any.whl → 0.3.1__py3-none-any.whl

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.
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastapi-radar
3
- Version: 0.1.6
3
+ Version: 0.3.1
4
4
  Summary: A debugging dashboard for FastAPI applications with real-time monitoring
5
5
  Home-page: https://github.com/doganarif/fastapi-radar
6
6
  Author: Arif Dogan
7
7
  Author-email: Arif Dogan <me@arif.sh>
8
- License-Expression: MIT
8
+ License: MIT
9
9
  Project-URL: Homepage, https://github.com/doganarif/fastapi-radar
10
10
  Project-URL: Bug Reports, https://github.com/doganarif/fastapi-radar/issues
11
11
  Project-URL: Source, https://github.com/doganarif/fastapi-radar
@@ -13,7 +13,6 @@ Keywords: fastapi,debugging,monitoring,dashboard,development-tools
13
13
  Classifier: Development Status :: 4 - Beta
14
14
  Classifier: Intended Audience :: Developers
15
15
  Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.8
17
16
  Classifier: Programming Language :: Python :: 3.9
18
17
  Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
@@ -24,19 +23,25 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
23
  Requires-Python: >=3.8
25
24
  Description-Content-Type: text/markdown
26
25
  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
26
+ Requires-Dist: fastapi
27
+ Requires-Dist: sqlalchemy>=2.0
28
+ Requires-Dist: pydantic
29
+ Requires-Dist: starlette
30
+ Requires-Dist: duckdb==1.1.3
31
+ Requires-Dist: duckdb-engine==0.17.0
32
+ Requires-Dist: aiosqlite>=0.21.0
31
33
  Provides-Extra: dev
32
- Requires-Dist: pytest>=7.0.0; extra == "dev"
33
- Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
34
- Requires-Dist: uvicorn[standard]>=0.15.0; extra == "dev"
35
- Requires-Dist: black>=22.0.0; extra == "dev"
36
- Requires-Dist: isort>=5.10.0; extra == "dev"
37
- Requires-Dist: flake8>=4.0.0; extra == "dev"
38
- Requires-Dist: mypy>=0.950; extra == "dev"
39
- Requires-Dist: httpx>=0.28.1; extra == "dev"
34
+ Requires-Dist: pytest; extra == "dev"
35
+ Requires-Dist: pytest-asyncio; extra == "dev"
36
+ Requires-Dist: uvicorn[standard]; extra == "dev"
37
+ Requires-Dist: black; extra == "dev"
38
+ Requires-Dist: isort; extra == "dev"
39
+ Requires-Dist: flake8; extra == "dev"
40
+ Requires-Dist: mypy; extra == "dev"
41
+ Requires-Dist: httpx; extra == "dev"
42
+ Provides-Extra: release
43
+ Requires-Dist: build; extra == "release"
44
+ Requires-Dist: twine; extra == "release"
40
45
  Dynamic: author
41
46
  Dynamic: home-page
42
47
  Dynamic: license-file
@@ -138,9 +143,47 @@ radar = Radar(
138
143
  capture_sql_bindings=True, # Capture SQL query parameters
139
144
  exclude_paths=["/health"], # Paths to exclude from monitoring
140
145
  theme="auto", # Dashboard theme: "light", "dark", or "auto"
146
+ db_path="/path/to/db", # Custom path for radar.duckdb file (default: current directory)
141
147
  )
142
148
  ```
143
149
 
150
+ ### Custom Database Location
151
+
152
+ By default, FastAPI Radar stores its monitoring data in a `radar.duckdb` file in your current working directory. You can customize this location using the `db_path` parameter:
153
+
154
+ ```python
155
+ # Store in a specific directory
156
+ radar = Radar(app, db_path="/var/data/monitoring")
157
+ # Creates: /var/data/monitoring/radar.duckdb
158
+
159
+ # Store with a specific filename
160
+ radar = Radar(app, db_path="/var/data/my_app_monitoring.duckdb")
161
+ # Creates: /var/data/my_app_monitoring.duckdb
162
+
163
+ # Use a relative path
164
+ radar = Radar(app, db_path="./data")
165
+ # Creates: ./data/radar.duckdb
166
+ ```
167
+
168
+ If the specified path cannot be created, FastAPI Radar will fallback to using the current directory with a warning.
169
+
170
+ ### Development Mode with Auto-Reload
171
+
172
+ When running your FastAPI application with `fastapi dev` (which uses auto-reload), FastAPI Radar automatically switches to an in-memory database to avoid file locking issues. This means:
173
+
174
+ - **No file locking errors** - The dashboard will work seamlessly in development
175
+ - **Data doesn't persist between reloads** - Each reload starts with a fresh database
176
+ - **Production behavior unchanged** - When using `fastapi run` or deploying, the normal file-based database is used
177
+
178
+ ```python
179
+ # With fastapi dev (auto-reload enabled):
180
+ # Automatically uses in-memory database - no configuration needed!
181
+ radar = Radar(app)
182
+ radar.create_tables() # Safe to call - handles multiple processes gracefully
183
+ ```
184
+
185
+ This behavior only applies when using the development server with auto-reload (`fastapi dev`). In production or when using `fastapi run`, the standard file-based DuckDB storage is used.
186
+
144
187
  ## What Gets Captured?
145
188
 
146
189
  - ✅ HTTP requests and responses
@@ -0,0 +1,19 @@
1
+ fastapi_radar/__init__.py,sha256=dGuFHC_3pjoNIB6KsOXgrUA10lwzi3NI2yrcLmz_LeA,208
2
+ fastapi_radar/api.py,sha256=iWm8SUbnXR34JSRE_5lQjVW-5loTcV6MBybC0-sBRqo,22862
3
+ fastapi_radar/background.py,sha256=mTotE-K4H7rYZ1RIDn525XtoN-ZqDAlnG7sOBzvx4TI,4085
4
+ fastapi_radar/capture.py,sha256=weWpI2HBb-qp04SZMWXt-Lx3NYo44WBvH65-Yyvv_UI,6623
5
+ fastapi_radar/middleware.py,sha256=CSEX6bwj5uE9XMSHslNmwl1Ll6Yl8hLJFLGk8csjq2E,8711
6
+ fastapi_radar/models.py,sha256=fyiliKcvDv98q7X-CjWaOlEeX0xnJox3zEyZuwR_aBU,5819
7
+ fastapi_radar/radar.py,sha256=I_nF3YgKKloO9O4ycB27aLo2Y5AdG1xt8t22qVpysJk,13940
8
+ fastapi_radar/tracing.py,sha256=GNayJJaxZR68ZiT3Io9GUyd9SnbFrfXGnRRpQigLDL0,8798
9
+ fastapi_radar/utils.py,sha256=Btmie6I66eyib43jwVqAFZwnIbWDrysly-I8oCkcM_Q,2260
10
+ fastapi_radar/dashboard/dist/index.html,sha256=ACbU2M9oSEONogQcqLPeymIaxMXf2257_drDAHpTM7s,436
11
+ fastapi_radar/dashboard/dist/assets/index-8Om0PGu6.js,sha256=PJJmrtFlm4l3fgH_PIx5USypRSwWzqEpIzALol7b-30,925269
12
+ fastapi_radar/dashboard/dist/assets/index-D51YrvFG.css,sha256=voYJADvNg5vaG4sFp8C-RKIt3011JuvaeVSev3jkKMQ,36262
13
+ fastapi_radar/dashboard/dist/assets/index-p3czTzXB.js,sha256=P37rXeybVEj9sADBkQO7YBptwp747mZzdT4Xamb-9TM,948079
14
+ fastapi_radar/dashboard/node_modules/flatted/python/flatted.py,sha256=UYburBDqkySaTfSpntPCUJRxiBGcplusJM7ECX8FEgA,3860
15
+ fastapi_radar-0.3.1.dist-info/licenses/LICENSE,sha256=0ga4BB6q-nqx6xlDRhtrgKrYs0HgX02PQyIzNFRK09Q,1067
16
+ fastapi_radar-0.3.1.dist-info/METADATA,sha256=ntw4kL9zrUN55lkMjyl2gqWgKcBboM7yTq1YoXPewH4,7732
17
+ fastapi_radar-0.3.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
18
+ fastapi_radar-0.3.1.dist-info/top_level.txt,sha256=FESRhvz7hUtE4X5D2cF-tyWcMUGVWeJK0ep4SRGvmEU,14
19
+ fastapi_radar-0.3.1.dist-info/RECORD,,