1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-12-28 20:52:30 +01:00
ntfy/examples/publish-python/publish.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
293 B
Python
Raw Normal View History

#!/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()