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 details)
Built Distribution
File details
Details for the file flask-sock-0.0.5.tar.gz
.
File metadata
- Download URL: flask-sock-0.0.5.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.8.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d5952876d14aff397e47dfea350b5ab7dfd9f7235ad432edb64c5d852a9df7c |
|
MD5 | b8cce4c6a94a4e134e74faefcbbe1316 |
|
BLAKE2b-256 | a1ee09107e2c1200a4268d8593c26a73dea0a78e7fa4a30f8ea1bdf2952436b1 |
File details
Details for the file flask_sock-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: flask_sock-0.0.5-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.8.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a7f7d6a41fd72f221c331a0110d3dbacce8e135fa97d1cac9bc43ceff159a9ea |
|
MD5 | 6bbd921e012c91384248a1d07f6b1f6b |
|
BLAKE2b-256 | 0f1211362c2a3a16a0de837158df00f44e47a8c06506df11199b3e3a3406dc31 |