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
Release history Release notifications | RSS feed
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.5.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for flask_sock-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7f7d6a41fd72f221c331a0110d3dbacce8e135fa97d1cac9bc43ceff159a9ea |
|
MD5 | 6bbd921e012c91384248a1d07f6b1f6b |
|
BLAKE2b-256 | 0f1211362c2a3a16a0de837158df00f44e47a8c06506df11199b3e3a3406dc31 |