Skip to main content

Adds Pusher support for your Flask application.

Project description

Flask-Pusher is a wrapper around pusher-http-python and adds Pusher support for your Flask application.

Easy Setup

Quickstart:

from flask_pusher import Pusher

app = Flask(__name__)
pusher = Pusher(app)

# Use any `pusher.Pusher` method.
pusher.trigger('channel', 'my-event', {'data': 'It works!'})

Or using the factory pattern:

from flask_pusher import Pusher

pusher = Pusher()

def create_app():
    app = Flask(__name__):
    pusher.init_app(app)

    # Use any `pusher.Pusher` method.
    pusher.trigger('channel', 'my-event', {'data': 'It works!'})

Easy Installation

$ pip install FlaskPusher
$ # NOT Flask-Pusher

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page