import requests def send_notification(token, title, body, data=None): message = { "to": token, "sound": "default", "title": title, "body": body, "data": data or {}, } response = requests.post( "https://exp.host/--/api/v2/push/send", json=message, headers={"Content-Type": "application/json"} ) return response.json()