title: PY3: Flask-Socketio Alternative?
body: <p>All, I've been using Flask-Socketio extension with PY2.7, but recently migrated to PY3. There's no Gevent support for PY3 (yet), which breaks Flask-Socketio (the flask-socketio author is also waiting for this, see <a href="https://flask-socketio.readthedocs.org/en/latest/" rel="nofollow" title="[current limitations]">current limitations</a>). </p>
  
  <p>Is there any alternative to implementing websockets on flask running under NGINX/uWSGI with PY3? </p>
  
  <p>So far: I've come across <a href="https://github.com/aaugustin/websockets" rel="nofollow">this</a> server/client implementation that uses PY3's asyncio <strong>with no gevent requirement</strong>, but it's not for flask. Any advice  on how to embed this into the current flask server would also be great. More specifically the server implementation <a href="https://github.com/aaugustin/websockets/blob/master/example/server.py" rel="nofollow">there</a> looks like:</p>
  
  <pre><code>start_server = websockets.serve(hello, 'localhost', 8765)
  
  asyncio.get_event_loop().run_until_complete(start_server)
  asyncio.get_event_loop().run_forever()
  </code></pre>
  
  <p>Not sure how to embed this into the main flask server script, make it work with uWSGI (which also supports websocket, adding to my confusion), etc. Any advice here?</p>