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.4.tar.gz
(1.7 kB
view hashes)
Built Distribution
Close
Hashes for flask_sock-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c73e2c14ca3b6bb5856f6bdb78549bb1506d1ec253d6bd266924e729b473a94 |
|
MD5 | d21282ffec52a8f4a9af8b39d284af87 |
|
BLAKE2b-256 | 86a3f04d04b1b97bcf4e9dd31a6430ec7c8d1ff9ab3f114122627081b6718043 |