summaryrefslogtreecommitdiffstats
path: root/extra/push-examples/python/index.py
diff options
context:
space:
mode:
Diffstat (limited to 'extra/push-examples/python/index.py')
-rw-r--r--extra/push-examples/python/index.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/extra/push-examples/python/index.py b/extra/push-examples/python/index.py
new file mode 100644
index 0000000..c735b29
--- /dev/null
+++ b/extra/push-examples/python/index.py
@@ -0,0 +1,10 @@
+import urllib.request
+import time
+
+push_url = "https://example.com/api/push/key?status=up&msg=OK&ping="
+interval = 60
+
+while True:
+ urllib.request.urlopen(push_url)
+ print("Pushed!\n")
+ time.sleep(interval)