Files
flask-sockets/README.rst
T
Kenneth Reitz 1d118fdaa5 new tagline
2013-09-30 21:09:48 -04:00

29 lines
515 B
ReStructuredText

Flask-Sockets
=============
Elegant WebSockets for your Flask apps.
The Problem
-----------
Serving WebSockets in Python were really difficult.
.. code-block:: python
from flask import Flask
from flask_sockets import Sockets
app = Flask(__name__)
sockets = Sockets(app)
@sockets.route('/echo')
def echo_socket(ws):
while True:
message = ws.receive()
ws.send(message)
@app.route('/')
def hello():
return 'Hello World!'
Now they're not.