MCPcopy Index your code
hub / github.com/plotly/dash / view_func

Method view_func

dash/backends/_fastapi.py:589–599  ·  view source on GitHub ↗
(_request: Request, body: dict = Body(...))

Source from the content-addressed store, hash-verified

587
588 def make_view_func(handler, param_names):
589 async def view_func(_request: Request, body: dict = Body(...)):
590 kwargs = {
591 k: v
592 for k, v in body.items()
593 if k in param_names and v is not None
594 }
595 if inspect.iscoroutinefunction(handler):
596 result = await handler(**kwargs)
597 else:
598 result = handler(**kwargs)
599 return JSONResponse(content=result)
600
601 return view_func
602

Callers

nothing calls this directly

Calls 1

handlerFunction · 0.85

Tested by

no test coverage detected