TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Introducing Flask-Sockets

63 点作者 jnoller超过 11 年前

7 条评论

stevenwei超过 11 年前
Thanks for this. A few months ago I looked into getting gevent-socketio up and running to do real-time messaging between a Flask app and an iOS app. gevent-socketio provides event handling and a messaging protocol on top of websockets that I thought would be useful.<p>However, based on my testing, in its current state it&#x27;s nowhere near ready for production. There are some serious bugs relating to memory leaks, improperly closing stale sockets, and deployment on Gunicorn with # workers &gt; 1 is not currently possible. (And in practice I don&#x27;t think you would want to deploy on anything besides Gunicorn.) The project also seems to be somewhat inactive, there are a lot of open critical issues and there hasn&#x27;t been any real activity in the last 6 months or so.<p>At this point I am considering removing the library and using a straight websocket implementation with a simpler protocol instead.
评论 #6481854 未加载
codysoyland超过 11 年前
This looks like a thin wrapper over gevent-websocket. The code is slightly longer than the README: <a href="https://github.com/kennethreitz/flask-sockets/blob/master/flask_sockets.py" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;kennethreitz&#x2F;flask-sockets&#x2F;blob&#x2F;master&#x2F;fl...</a><p>Not to discredit the attempt to make gevent-websocket more accessible, but there&#x27;s nothing really new here. Here&#x27;s an example of using gevent-websocket with flask without this library: <a href="https://gist.github.com/lrvick/1185629" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;lrvick&#x2F;1185629</a>
评论 #6477165 未加载
twism超过 11 年前
Websockets in python is easy.<p><a href="http://www.tornadoweb.org/en/stable/websocket.html" rel="nofollow">http:&#x2F;&#x2F;www.tornadoweb.org&#x2F;en&#x2F;stable&#x2F;websocket.html</a>
评论 #6477421 未加载
toanant超过 11 年前
Flask users will be grateful for support of web-sockets, because beginner in python can use flask &amp; now flask-sockets too for building small but useful projects. Thanks Reitz for this.
rubycowgames超过 11 年前
I&#x27;ve been using gevent-socketio for websockets with Flask. I&#x27;m new to python. Can someone tell me why I&#x27;d want to use this over gevent-socketio?
评论 #6476983 未加载
评论 #6478585 未加载
sshThis超过 11 年前
A few questions, does this work with Python 3.3?<p>Also, how is it better than Tornado web sockets?
评论 #6477000 未加载
评论 #6477536 未加载
评论 #6476994 未加载
PhasmaFelis超过 11 年前
I was kind of hoping this would be some sort of power socket shaped like a pocket flask.