Skip to main content

WebSocket support for Flask

Project description

flask-sock

WebSocket support for Flask

Installation

pip install flask-sock

Example

from flask import Flask, render_template
from flask_sock import Sock

app = Flask(__name__)
sock = Sock(app)


@sock.route('/echo')
def echo(sock):
    while True:
        data = sock.receive()
        sock.send(data)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask-sock-0.0.4.tar.gz (1.7 kB view hashes)

Uploaded Source

Built Distribution

flask_sock-0.0.4-py3-none-any.whl (2.3 kB view hashes)

Uploaded Python 3

Supported by

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