超輕量級協程框架 Eurasia

fmms 12年前發布 | 21K 次閱讀 Python Web框架

eurasia 是一種純異步超輕量級協程框架,或者工具集。主要用于高效能 web 開發,也適用于底層網絡開發和其他常規協程應用。自帶 wsgi、http 和 tcp 服務器,并具有將常規 IO 轉換為協程異步的能力,可以讓你用最 pythonic 的方式,編寫出優美的程序。

示例代碼:

from eurasia.web import httpserver, mainloop
def handler(httpfile):
    httpfile.start_response('200 OK', [('Content-Type', 'text/plain')])
    httpfile.sendall('hello world!')
    httpfile.close()

httpd = httpserver('0.0.0.0:8080', handler)
httpd.start()
mainloop()


此軟件被Zoom.Quiet  評為國產神作!

項目主頁:http://www.baiduhome.net/lib/view/home/1323612416421

 本文由用戶 fmms 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!