MCPcopy
hub / github.com/fastapi/fastapi / send_notification

Function send_notification

docs_src/background_tasks/tutorial002_an_py310.py:21–26  ·  view source on GitHub ↗
(
    email: str, background_tasks: BackgroundTasks, q: Annotated[str, Depends(get_query)]
)

Source from the content-addressed store, hash-verified

19
20@app.post("/send-notification/{email}")
21async def send_notification(
22 email: str, background_tasks: BackgroundTasks, q: Annotated[str, Depends(get_query)]
23):
24 message = f"message to {email}\n"
25 background_tasks.add_task(write_log, message)
26 return {"message": "Message sent"}

Callers

nothing calls this directly

Calls 2

DependsClass · 0.90
add_taskMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…