Integrate brrr with Python
Python can send a brrr notification with urllib.request.
The following example sends a JSON payload with a title and message. The response status and body are printed so you can confirm the request succeeded.
Python
import json import urllib.request
url = "https://api.brrr.now/v1/🙈🙈🙈🙈🙈🙈🙈🙈🙈🙈"
data = json.dumps({
"title": "Test from Python",
"message": "Hello world! 🚀"
}).encode()
req = urllib.request.Request(
url,
data=data,
method="POST",
headers={
"User-Agent": "Mozilla/5.0",
"Content-Type": "application/json"
}
)
with urllib.request.urlopen(req) as res:
print(res.status)
print(res.read().decode())
Continue to Docs for the full webhook format if you want to add more fields.