Skip to main content

Werkzeug debugger middleware for Starlette

Project description

codecov version downloads license

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

https://raw.github.com/wiki/mireq/starlette-werkzeug-debugger/debugger.png?v=2023-06-20

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

starlette_werkzeug_debugger-0.2.0.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file starlette_werkzeug_debugger-0.2.0.tar.gz.

File metadata

File hashes

Hashes for starlette_werkzeug_debugger-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f0d436dcf4509a32b752e829766bbaf53e918a093e80367626042521384322cd
MD5 808172cb8c7075e619b44cebf98c478e
BLAKE2b-256 240d131e4e8f6e425953aca1c8f6111792f5f3a853a449059530f95999d9ef5f

See more details on using hashes here.

File details

Details for the file starlette_werkzeug_debugger-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for starlette_werkzeug_debugger-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7fc46b4d85c8d568b7ddcd30f4ee3cadb82054118151d12a1285b91c0fd62c29
MD5 d82c38991f8fdaeb654a0f63bd98ae97
BLAKE2b-256 5d06b0a838a116ebbfe84a9db58b98953be336bc617fb595b4139883d2f0c25e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page