推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
winkidney
V2EX  ›  Python

自用 Flask websocket 库

  •  
  •   winkidney ·
    winkidney · Jul 21, 2015 · 5255 views
    This topic created in 4014 days ago, the information mentioned may be changed or developed.

    好久没来v2了233333

    https://github.com/winkidney/flask-sockets-tornado
    自用的flask websockets项目,原作者已经停止维护了,添加了一些比较有必要性的方便功能
    Maybe it helps:)

    修改的地方:
    1. 增加了Tornado风格的WebSocketHandler, 不用直接写一个endless loop了:)
    2. FLask's 请求和wsgi上下文支持,websocket里可以用引用flask的request实例
    3. Flask demo app

    来冒泡顺便炸鱼(某kso鱼塘)2333

    12 replies    2015-07-22 15:03:05 +08:00
    ieiayaobb
        1
    ieiayaobb  
       Jul 21, 2015
    为啥不整一个flask支持socketio的?
    winkidney
        2
    winkidney  
    OP
       Jul 21, 2015
    @ieiayaobb 那个已经有人写过了,可用性不知道,没有尝试,这个的目的还是为了不引入另一套庞大的系统(Node)
    ieiayaobb
        3
    ieiayaobb  
       Jul 21, 2015
    那个原作者到socket.io 0.9.16就不更新了,现在貌似都是1.3.5了...
    winkidney
        4
    winkidney  
    OP
       Jul 21, 2015
    @ieiayaobb 原来如此……现在已经无法运作了么?
    yafeilee
        5
    yafeilee  
    PRO
       Jul 21, 2015
    来支持一下
    winkidney
        6
    winkidney  
    OP
       Jul 21, 2015
    @yafeilee 发现一只基佬
    yafeilee
        7
    yafeilee  
    PRO
       Jul 21, 2015
    @winkidney 汗...
    bramblex
        8
    bramblex  
       Jul 22, 2015
    炸鱼
    ieiayaobb
        9
    ieiayaobb  
       Jul 22, 2015
    winkidney
        10
    winkidney  
    OP
       Jul 22, 2015
    @bramblex 炸出了jj的思念(手工斜眼
    winkidney
        11
    winkidney  
    OP
       Jul 22, 2015
    @ieiayaobb 仔细看了下,socketio是用的gevent-socketio,和node无关,只是前端用的socketio的client library,爆炸。确实socketio的支持比较棒,还能longpooling,估计gevent-socketio原作者也不想继续支持下去?
    ieiayaobb
        12
    ieiayaobb  
       Jul 22, 2015
    @winkidney
    gevent-socketio的作者表示没时间更新
    https://github.com/abourget/gevent-socketio/issues/192
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4725 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 65ms · UTC 09:53 · PVG 17:53 · LAX 02:53 · JFK 05:53
    ♥ Do have faith in what you're doing.