tornado源码分析-模块介绍

1.Core web framework
tornado.web - web框架功能模块,包括RequestHandler和Application两个重要的类
tornado.httpserver - 实现了一个无阻塞HTTP服务器
tornado.template - html模板系统(tornado后端和前端交互,构成html页面)
tornado.escape - html,json,urls等的编码解码和一些字符串操作(解决编码问题)
tornado.locale - 国际化支持(如中文,英文等)

2.Asynchronous networking底层模块
tornado.ioloop - 核心的I/O事件循环
tornado.iostream - 对非阻塞的socket的简单封装,以方便常用读写操作
tornado.httpclient - 实现了一个http客户端(支持同步,异步)
tornado.netutil - 网络应用实现,如TCPServer类

3.和其他第三方服务交互模块
tornado.auth - 使用OpenId和Oauth进行第三方登录
tornado.platform.twisted - 在Tornado上运行Twisted实现的代码
tornado.websocket - 实现和浏览器的双向通信
tornado.wsgi - 与其他python网络框架/服务器的相互操作(如flask等)

4.工具类
tornado.autoreload - 生产环境中自动检查代码更新
tormado.gen - 基于生成器的接口,可使代码异步运行
tornado.httputil - 分析http请求内容
tornado.options - 控制台终端参数
tornado.process - 多进程实现的封装
tornado.stack_context - 异步环境中对回调函数的上下文保存,异常处理
tornado.testing - 单元测试

原文地址:https://www.cnblogs.com/shijingjing07/p/7698423.html