Werkzeug debugger middleware for Starlette
Project description
This package contains interactive debuger middleware for Starlette / FastAPI.
Install
pip install starlette_werkzeug_debugger
Usage with Starlette
from starlette.applications import Starlette
from starlette.middleware import Middleware
from starlette.routing import Route
import starlette_werkzeug_debugger
async def raise_error(request):
local_var = 3
raise RuntimeError("Raised error")
middleware = [
Middleware(starlette_werkzeug_debugger.WerkzeugDebugMiddleware, evalex=True)
]
app = Starlette(debug=True, middleware=middleware, routes=[
Route('/', raise_error),
])
Usage with FastAPI
from fastapi import FastAPI
import starlette_werkzeug_debugger
app = FastAPI()
app.add_middleware(starlette_werkzeug_debugger.WerkzeugDebugMiddleware, evalex=True)
@app.get("/")
async def raise_error():
local_var = 3
raise RuntimeError("Raised error")
Screenshots
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file starlette_werkzeug_debugger-0.2.0.tar.gz.
File metadata
- Download URL: starlette_werkzeug_debugger-0.2.0.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0d436dcf4509a32b752e829766bbaf53e918a093e80367626042521384322cd
|
|
| MD5 |
808172cb8c7075e619b44cebf98c478e
|
|
| BLAKE2b-256 |
240d131e4e8f6e425953aca1c8f6111792f5f3a853a449059530f95999d9ef5f
|
File details
Details for the file starlette_werkzeug_debugger-0.2.0-py3-none-any.whl.
File metadata
- Download URL: starlette_werkzeug_debugger-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fc46b4d85c8d568b7ddcd30f4ee3cadb82054118151d12a1285b91c0fd62c29
|
|
| MD5 |
d82c38991f8fdaeb654a0f63bd98ae97
|
|
| BLAKE2b-256 |
5d06b0a838a116ebbfe84a9db58b98953be336bc617fb595b4139883d2f0c25e
|