Spaces:
Sleeping
Sleeping
Download community_contributions/claude_based_chatbot_tc/modules/notification.py from FlaRDevelop/Test1: direct link, hf CLI and curl.
- Browser
- Download file 568 Bytes
-
https://huggingface.co/spaces/FlaRDevelop/Test1/resolve/main/community_contributions/claude_based_chatbot_tc/modules/notification.py
- Command line
-
hf download hf://spaces/FlaRDevelop/Test1/community_contributions/claude_based_chatbot_tc/modules/notification.py
-
curl -L -o notification.py https://huggingface.co/spaces/FlaRDevelop/Test1/resolve/main/community_contributions/claude_based_chatbot_tc/modules/notification.py
568 Bytes
| """ | |
| Push notification system using Pushover | |
| """ | |
| import requests | |
| from .config import PUSHOVER_USER, PUSHOVER_TOKEN | |
| def push(text): | |
| """Send push notifications via Pushover""" | |
| if PUSHOVER_USER and PUSHOVER_TOKEN: | |
| print(f"Push: {text}") | |
| requests.post( | |
| "https://api.pushover.net/1/messages.json", | |
| data={ | |
| "token": PUSHOVER_TOKEN, | |
| "user": PUSHOVER_USER, | |
| "message": text, | |
| } | |
| ) | |
| else: | |
| print(f"Push notification (not sent): {text}") |