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 Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page