【文件属性】:
文件名称:vanilla.bean:Vanilla 的强制性 Sinatra 风格(但并发!)微网络框架
文件大小:16KB
文件格式:ZIP
更新时间:2021-07-03 03:34:28
Python
欢迎来到香草豆!
强制性 Sinatra 风格(但并发!)微网络框架。
例子
h = vanilla . Hub ()
b = h . bean ( port = 8000 )
@ b . get ( '/' )
def index ( request ):
response = request . reply ()
response . send ( 'Hello ' )
h . sleep ( 1000 )
response . send ( 'World \n ' )
网络套接字
h = vanilla . Hub ()
b = h . bean ( port = 8000 )
@ b . websocket ( '/echo' )
def echo ( ws ):
while True :
ws . send ( ws
【文件预览】:
vanilla.bean-master
----setup.py(1KB)
----.gitignore(358B)
----requirements.txt(15B)
----.travis.yml(171B)
----MANIFEST.in(60B)
----vanilla()
--------__init__.py(80B)
--------bean.py(5KB)
----README.rst(880B)
----tests()
--------test_bean.py(3KB)
----docs()
--------images()
----tox.ini(351B)