ntfy/examples/subscribe-python/subscribe.py
2021-12-15 20:37:21 -05:00

9 lines
170 B
Python
Executable File

#!/usr/bin/env python3
import requests
resp = requests.get("https://ntfy.sh/mytopic/json", stream=True)
for line in resp.iter_lines():
if line:
print(line)