Python Web Development in Practice
Tags
Summary
It begins with technology selection: why use Python for web development, the historical choice between Python 2 and Python 3, and a comparison of mainstream and niche web frameworks along with selection principles. It then moves on to development environment setup, covering VirtualBox, Vagrant, and Docker for building environments, as well as package management and virtual environment practices with pip and the virtualenv family. The main body uses Flask as its throughline, progressing from routing, templates, blueprints, and pluggable views to MySQL, SQLAlchemy ORM, contexts, and LocalProxy, then extending into the Flask ecosystem of extensions such as signals, Flask-Script, Flask-Migrate, Flask-WTF, Flask-Security, Flask-RESTful, and Flask-Admin.
Engineering and production-side content forms the heart of the book: RESTful API design guidelines and Ajax; the WSGI protocol, Nginx deployment, Memcached, Redis, MongoDB, and lessons from large-scale website architecture; Supervisor, Fabric, SaltStack, Ansible, Sentry, and monitoring systems with StatsD/Graphite/Grafana; unittest, doctest, py.test, mock, and continuous integration; Beanstalkd, RabbitMQ, Celery message queues and asynchronous tasks; service-oriented practices with Thrift and Douban's PIDL; log MapReduce with DPark and data reporting with Pandas; as well as IPython, Jupyter Notebook, concurrent programming, advanced Python syntax, and code quality toolchains.
Many of the examples in the book come from real production practices at Douban, making it well suited for connecting fragmented Python knowledge into a complete web engineering skill set.
Editor's review
Who it's for
A good fit for
- 已掌握 Python 基础语法、想系统了解 Web 工程全貌的开发者
- 用 Flask 做过小项目,想补齐部署、监控、测试链路的后端工程师
- 以 Python 为工作语言的运维工程师与运维开发工程师
- 希望了解豆瓣等大型站点架构与选型思路的技术人员
- 需要一份 Web 项目技术选型参考清单的技术负责人
Not a good fit for
- 完全没有编程基础的零起点读者,书里默认已有 Python 手感
- 只想学 Django 官方教程式写法的纯入门者
- 寻求 2016 年后新版本框架实操(如 Flask 2.x/3.x)的读者
- 只想找前端或 UI 设计内容的设计师
Reading tips
- 先读第1、2章与第15章,建立「选型—环境—项目结构」的整体框架,再回填中间章节。
- 第3、4章务必对照代码敲一遍,但把 pip、virtualenv 等命令替换为当前官方推荐写法。
- 第6至11章可当作技术选型地图按需查阅,遇到监控、服务化等概念先建立轮廓,用时再深入。
- 把书中示例当作工程思路而非可运行代码,配合 GitHub 上的勘误与示例仓库、以及各工具官方文档一起读。
About the publisher
The Publishing House of Electronics Industry is a comprehensive publisher distinguished by its focus on electronic information and related fields. Judging from the more than 3,000 titles in its catalogue, its publishing covers programming and design, artificial intelligence, computer science, finance and economics, photography, and social sciences, attending both to cutting-edge technology and to general readers. Representative titles include Factor Investing: Methods and Practice, x86 Assembly Language: From Real Mode to Protected Mode, The RISC-V Reader, Artificial Intelligence: Speech Recognition, Understanding and Practice, Phased Array Radar Technology, Radar Target Characteristics, and 100 Go Mistakes and How to Avoid Them, most of which centre on technical methods and engineering practice. Its authors include Shi Chuan, Li Zhong, Wang Xiaobo, David Patterson, Andrew Waterman, and Yu Zihao, among others from China and abroad. Owing to limited public information, no further publishing features are elaborated here.
Contents
- Chapter 1 Getting Started with Python Web Development
- Chapter 2 Preparing for Web Development
- Chapter 3 Flask Web Development
- Chapter 4 Advanced Flask Development
- Chapter 5 REST and Ajax
- Chapter 6 Website Architecture
- Chapter 7 System Administration
- Chapter 8 Testing and Continuous Integration
- Chapter 9 Message Queues and Celery
- Chapter 10 Service Orientation
- Chapter 11 Data Processing
- Chapter 12 Helper Tools
- Chapter 13 Concurrent Programming in Python
- Chapter 14 Advanced Python
- Chapter 15 Web Development Project Practice
FAQ
这本书适合零基础学 Python 的人读吗?
这本书主要讲 Django 还是 Flask?
2016 年出版,现在读会不会过时?
作者的实战背景是什么?
书中内容有配套资源和勘误吗?
Comments
Find this book
This site is an index: you start “Search all sources” in your browser, and the entries it lists all point to third-party sites; please judge their availability yourself.