- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for send_notification (0.08 sec)
-
fastapi/background.py
with open("log.txt", mode="w") as email_file: content = f"notification for {email}: {message}" email_file.write(content) @app.post("/send-notification/{email}") async def send_notification(email: str, background_tasks: BackgroundTasks): background_tasks.add_task(write_notification, email, message="some notification") return {"message": "Notification sent in the background"} ``` """
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Apr 02 02:48:51 UTC 2024 - 1.7K bytes - Viewed (0)