PyWebIO v1.3.2 Documentationare as follows: Tornado Flask Django aioh�p FastAPI/Starle�e Use pywebio.platform.tornado.webio_handler() to get the WebSocketHandler [https://www.tornadoweb.org/en/stable/websocket.html#tornado.websocket in Tornado: import tornado.ioloop import tornado.web from pywebio.platform.tornado import webio_handler class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") application = tornado.web.Application([ (r"/", MainHandler), (r"/tool", webio_handler(task_func)), # `task_func` is PyWebIO task function ]) application.listen(port=80, address='localhost')0 码力 | 133 页 | 7.44 MB | 1 年前3
PyWebIO v1.3.0 Documentationare as follows: Tornado Flask Django aioh�p FastAPI/Starle�e Use pywebio.platform.tornado.webio_handler() to get the WebSocketHandler [https://www.tornadoweb.org/en/stable/websocket.html#tornado.websocket in Tornado: import tornado.ioloop import tornado.web from pywebio.platform.tornado import webio_handler class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") application = tornado.web.Application([ (r"/", MainHandler), (r"/tool", webio_handler(task_func)), # `task_func` is PyWebIO task function ]) application.listen(port=80, address='localhost')0 码力 | 133 页 | 7.44 MB | 1 年前3
PyWebIO v1.4.0 Documentationpassed in anywhere that put_xxx() can passed in. A handler it returned by output(), and after being output, the content can also be modified by the handler (See code example below). contents – The initial protocol attribute. Example: class pywebio.session.coroutinebased.TaskHandler(close, closed) The handler of coroutine task See also: run_async() close() Close the coroutine task. closed() → bool Returns start_server() functions can start a Python Web server and serve given PyWebIO applications on it. The webio_handler() and webio_view() functions can be used to integrate PyWebIO applications into existing Python Web0 码力 | 135 页 | 7.45 MB | 1 年前3
PyWebIO v1.3.1 Documentationare as follows: Tornado Flask Django aioh�p FastAPI/Starle�e Use pywebio.platform.tornado.webio_handler() to get the WebSocketHandler [https://www.tornadoweb.org/en/stable/websocket.html#tornado.websocket in Tornado: import tornado.ioloop import tornado.web from pywebio.platform.tornado import webio_handler class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") application = tornado.web.Application([ (r"/", MainHandler), (r"/tool", webio_handler(task_func)), # `task_func` is PyWebIO task function ]) application.listen(port=80, address='localhost')0 码力 | 133 页 | 7.44 MB | 1 年前3
PyWebIO v1.3.3 Documentationare as follows: Tornado Flask Django aioh�p FastAPI/Starle�e Use pywebio.platform.tornado.webio_handler() to get the WebSocketHandler [https://www.tornadoweb.org/en/stable/websocket.html#tornado.websocket in Tornado: import tornado.ioloop import tornado.web from pywebio.platform.tornado import webio_handler class MainHandler(tornado.web.RequestHandler): def get(self): self.write("Hello, world") application = tornado.web.Application([ (r"/", MainHandler), (r"/tool", webio_handler(task_func)), # `task_func` is PyWebIO task function ]) application.listen(port=80, address='localhost')0 码力 | 133 页 | 7.44 MB | 1 年前3
PyWebIO v1.3.3 Documentationtornado.webio_handler() to get the WebSocketHandler class for running Py- WebIO applications in Tornado: import tornado.ioloop import tornado.web from pywebio.platform.tornado import webio_handler class MainHandler(tornado __name__ == "__main__": application = tornado.web.Application([ (r"/", MainHandler), (r"/tool", webio_handler(task_func)), # `task_func` is PyWebIO task function ]) application.listen(port=80, address='localhost') platform.aiohttp.webio_handler() to get the Request Handler coroutine for running Py- WebIO applications in aiohttp: from aiohttp import web from pywebio.platform.aiohttp import webio_handler app = web.Application()0 码力 | 100 页 | 1.34 MB | 1 年前3
PyWebIO v1.3.1 Documentationtornado.webio_handler() to get the WebSocketHandler class for running Py- WebIO applications in Tornado: import tornado.ioloop import tornado.web from pywebio.platform.tornado import webio_handler class MainHandler(tornado __name__ == "__main__": application = tornado.web.Application([ (r"/", MainHandler), (r"/tool", webio_handler(task_func)), # `task_func` is PyWebIO task function ]) application.listen(port=80, address='localhost') platform.aiohttp.webio_handler() to get the Request Handler coroutine for running Py- WebIO applications in aiohttp: from aiohttp import web from pywebio.platform.aiohttp import webio_handler app = web.Application()0 码力 | 100 页 | 1.34 MB | 1 年前3
PyWebIO v1.3.0 Documentationtornado.webio_handler() to get the WebSocketHandler class for running Py- WebIO applications in Tornado: import tornado.ioloop import tornado.web from pywebio.platform.tornado import webio_handler class MainHandler(tornado __name__ == "__main__": application = tornado.web.Application([ (r"/", MainHandler), (r"/tool", webio_handler(task_func)), # `task_func` is PyWebIO task function ]) application.listen(port=80, address='localhost') platform.aiohttp.webio_handler() to get the Request Handler coroutine for running Py- WebIO applications in aiohttp: from aiohttp import web from pywebio.platform.aiohttp import webio_handler app = web.Application()0 码力 | 100 页 | 1.34 MB | 1 年前3
PyWebIO v1.2.3 Documentationapplication: import tornado.ioloop import tornado.web from pywebio.platform.tornado import webio_handler from pywebio import STATIC_PATH class MainHandler(tornado.web.RequestHandler): def get(self): application = tornado.web.Application([ (r"/", MainHandler), (r"/tool", webio_handler(task_func)), # `task_func` is PyWebIO task function ]) application.listen(port=80, address='localhost') address='localhost') tornado.ioloop.IOLoop.current().start() In above code, we use webio_handler(task_func) to get the Tornado WebSocketHandler [https://www.tornadoweb.org/en/stable/websocket.html#tornado0 码力 | 119 页 | 7.43 MB | 1 年前3
PyWebIO v1.2.2 Documentationapplication: import tornado.ioloop import tornado.web from pywebio.platform.tornado import webio_handler from pywebio import STATIC_PATH class MainHandler(tornado.web.RequestHandler): def get(self): application = tornado.web.Application([ (r"/", MainHandler), (r"/tool", webio_handler(task_func)), # `task_func` is PyWebIO task function ]) application.listen(port=80, address='localhost') address='localhost') tornado.ioloop.IOLoop.current().start() In above code, we use webio_handler(task_func) to get the Tornado WebSocketHandler [https://www.tornadoweb.org/en/stable/websocket.html#tornado0 码力 | 119 页 | 7.41 MB | 1 年前3
共 86 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9













