publish.py 293 B

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