ntfy/examples/publish-python/publish.py
2022-11-05 14:12:57 +01:00

13 lines
293 B
Python

#!/usr/bin/env python3
import requests
resp = requests.get("https://ntfy.sh/mytopic/trigger",
data="Backup successful 😀".encode(encoding='utf-8'),
headers={
"Priority": "high",
"Tags": "warning,skull",
"Title": "Hello there"
})
resp.raise_for_status()