Debian Codegraph @

examples/publish-python/publish.py

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