MCPcopy Create free account
hub / github.com/fastapi/fastapi / write_notification

Function write_notification

docs_src/background_tasks/tutorial001_py310.py:6–9  ·  view source on GitHub ↗
(email: str, message="")

Source from the content-addressed store, hash-verified

4
5
6def write_notification(email: str, message=""):
7 with open("log.txt", mode="w") as email_file:
8 content = f"notification for {email}: {message}"
9 email_file.write(content)
10
11
12@app.post("/send-notification/{email}")

Callers

nothing calls this directly

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected