Tornado 6.5 Documentation
RequestHandler): def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler), ]) async def main(): app = make_app() app.listen(8888) await asyncio.Event() generally causes some work to happen in the background before triggering some future action in the application (as opposed to normal synchronous functions, which do every- thing they are going to do before run(main()) 6.1.5 Structure of a Tornado web application A Tornado web application generally consists of one or more RequestHandler subclasses, an Application object which routes incoming requests to handlers0 码力 | 272 页 | 1.12 MB | 2 月前3Tornado 6.5 Documentation
def get(self): self.write("Hello, world") def make_app(): return tornado.web.Application([ (r"/", MainHandler), ]) async def main(): app = make_app() app.listen(8888) spider Structure of a Tornado web application Templates and UI Authentication and security Running and deploying Web framework tornado.web — RequestHandler and Application classes tornado.template — Flexible background Queue example - a concurrent web spider Structure of a Tornado web application The main coroutine The Application object Subclassing RequestHandler Handling request input Overriding RequestHandler0 码力 | 437 页 | 405.14 KB | 2 月前3Rust 程序设计语言 简体中文版 1.85.0
本地文档 安装程序也自带一份文档的本地拷贝,可以离线阅读。运行 rustup doc 在浏览器中查看本地 文档。 任何时候,如果你拿不准标准库中的类型或函数的用途和用法,请查阅应用程序接口 (application programming interface,API)文档! 文本编辑器和集成开发环境(Integrated Development Environments, IDE) 本书不会假设你使用何种工具来编写 让我们来看看创建包的时候会发生什么。首先,我们输入命令 cargo new my-project: $ cargo new my-project Created binary (application) `my-project` package $ ls my-project Cargo.toml src $ ls my-project/src main.rs 运行了这条命令后,我们先用 new 新建一个项目,我们称之为 minigrep 以便与可能已经安装在系统上 的 grep 工具相区分。 $ cargo new minigrep Created binary (application) `minigrep` project $ cd minigrep 第一个任务是让 minigrep 能够接受两个命令行参数:文件路径和要搜索的字符串。也就是说 我们希望能够使用 cargo0 码力 | 562 页 | 3.23 MB | 10 天前3
共 3 条
- 1