-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.py
More file actions
25 lines (20 loc) · 688 Bytes
/
test.py
File metadata and controls
25 lines (20 loc) · 688 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env python
"""
Example usage of pyprowl module
"""
import pyprowl
p = pyprowl.Prowl('YOUR_PROWL_API_KEY')
try:
p.verify_key()
print("Prowl API key successfully verified!")
except Exception as e:
print("Error verifying Prowl API key: {}".format(e))
exit()
try:
p.notify(event='Event name', description='Description of event',
priority=0, url='http://www.example.com',
#apiKey='uncomment and add API KEY here if different',
appName='Name of app sending the notification')
print("Notification successfully sent to Prowl!")
except Exception as e:
print("Error sending notification to Prowl: {}".format(e))