Created
December 7, 2010 00:31
-
-
Save j4mie/731263 to your computer and use it in GitHub Desktop.
Send push notifications from GAE with Flask and Notifo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, request | |
from google.appengine.api.mail import InboundEmailMessage | |
import notifo | |
from config import NOTIFO_USER, NOTIFO_KEY | |
app = Flask(__name__) | |
@app.route("/_ah/mail/<address>", methods=['POST']) | |
def receive_mail(address): | |
message = InboundEmailMessage(request.data) | |
notifo.send_notification(NOTIFO_USER, NOTIFO_KEY, NOTIFO_USER, message.subject, 'pushhandler') | |
return 'OK' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment