Python Development in Practice for IoT (2nd Edition) cover

Python Development in Practice for IoT (2nd Edition)

Rating 4.0
Word count
113K words
Chapters
88
ISBN
9787121479953

Tags

Summary

This book introduces the composition, typical architecture, and applications of the Internet of Things (IoT), then uses concrete code to explain Python programming fundamentals and application examples, including IoT microcontroller development with MicroPython, methods for developing IoT gateways in Python, Web backend and frontend development for IoT using the Python Django framework, and common IoT communication solutions such as 2G, LoRa, and Zigbee, as well as IoT communication protocols such as MQTT and CoAP. Most importantly, through a complete large-scale IoT project, it demonstrates the details of Python development in depth. This book can be read by Python beginners and can also serve as a textbook for related majors.

Editor's review

This book takes Python as its main thread, organizing the composition and architecture of IoT, MicroPython microcontroller development, gateway development, Django backend and frontend, 2G/LoRa/Zigbee communication solutions, and MQTT and CoAP protocols into a relatively complete technical path, finally tying the development details together with a large-scale IoT project. For Python beginners, its strength lies in not merely teaching syntax but testing language skills in concrete hardware and communication scenarios, so readers can intuitively see how code drives devices, uploads data, and forms a backend. The second edition continues the project-driven approach and is suitable as a course textbook or a self-study roadmap. Readers are advised not to skip the communication protocol and gateway chapters; that part is often the key to moving an IoT project from a demo to something usable, and it works best when combined with hands-on building using physical modules.

Who it's for

A good fit for

  • Beginners with basic Python syntax concepts who want to enter IoT development
  • Embedded beginners who need to learn microcontrollers, gateways, and Web backends as an integrated whole
  • College teachers who teach IoT or Python application courses and are looking for project cases
  • Developers working on small IoT projects who want to understand practical use of protocols such as MQTT and CoAP

Not a good fit for

  • Complete beginners with no programming experience and no exposure to any language
  • Engineers focused only on hardware circuit design and PCB development who do not do software development
  • Senior architects seeking large-scale industrial IoT architecture and high-concurrency backend solutions

Reading tips

  1. First skim the table of contents to identify the four threads—microcontroller, gateway, backend, and communication—then plan the reading order.
  2. Be sure to do the MicroPython and gateway chapters hands-on with a development board; writing and debugging as you go is more rewarding than just reading code.
  3. For the communication protocols, master MQTT first, then study CoAP alongside it to understand the differences in their applicable scenarios.
  4. Finally, use the large project as an outline to review each chapter and connect the scattered knowledge points into a complete development chain.

About the publisher

Publishing House of Electronics Industry China · Founded in 1982

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

  1. 版权信息
  2. 前言
  3. 第1章 物联网邂逅Python
  4. 1.1 物联网组成架构
  5. 1.2 物联网发展现状
  6. 1.3 物联网典型应用
  7. 1.4 使用Python的理由
  8. 1.5 美丽的相遇
  9. 第2章 开启Python之旅
  10. 2.1 Python版本的选择
  11. 2.2 搭建开发环境
  12. 2.3 开始编写Python程序
  13. 2.4 变量和数据类型
  14. 2.5 条件和循环
  15. 2.6 函数
  16. 2.7 变量进阶
  17. 2.8 模块与包
  18. 2.9 异常处理
  19. 第3章 Python数据结构
  20. 3.1 字符串
  21. 3.2 列表
  22. 3.3 元组
  23. 3.4 字典
  24. 3.5 集合
  25. 第4章 Python高级特性
  26. 4.1 生成器
  27. 4.2 迭代器
  28. 4.3 函数式编程
  29. 4.4 面向对象编程
  30. 第5章 物联网核心组件
  31. 5.1 网络通信方案
  32. 5.2 网络通信协议
  33. 5.3 硬件
  34. 5.4 物联网云平台
  35. 第6章 MicroPython开发物联网终端
  36. 6.1 MicroPython简介
  37. 6.2 MicroPython开发板
  38. 6.3 第一个MicroPython程序
  39. 6.4 交互式解释器
  40. 6.5 按键中断与回调
  41. 6.6 定时器的使用
  42. 6.7 串口测试
  43. 6.8 SPI接口驱动显示屏
  44. 6.9 源代码编译与固件升级
  45. 6.10 MicroPython多线程
  46. 6.11 安全模式和恢复出厂设置
  47. 第7章 构建物联网网关
  48. 7.1 网关概述
  49. 7.2 自主构建网关
  50. 7.3 树莓派作为网关
  51. 第8章 网关数据编码与处理
  52. 8.1 读写CSV文件
  53. 8.2 JSON格式
  54. 8.3 XML文件
  55. 8.4 二进制数据的读写
  56. 8.5 Base64编解码
  57. 8.6 正则表达式
  58. 第9章 网关多进程与多线程
  59. 9.1 多进程
  60. 9.2 多线程
  61. 9.3 多线程和多进程的思考
  62. 9.4 异步IO
  63. 第10章 网关数据持久化
  64. 10.1 文件操作
  65. 10.2 SQLite数据库
  66. 第11章 Python扩展
  67. 11.1 Python扩展的原因
  68. 11.2 连接硬件的纽带
  69. 11.3 C语言扩展Python
  70. 第12章 网关网络编程
  71. 12.1 网关网络通信方案
  72. 12.2 Socket编程
  73. 12.3 requests
  74. 12.4 hbmqtt
  75. 12.5 LoRa网络通信
  76. 第13章 物联网后台Web开发
  77. 13.1 Django简介
  78. 13.2 创建一个网站
  79. 13.3 网站首页
  80. 13.4 Django模板系统
  81. 13.5 Django模型
  82. 13.6 用户注册
  83. 13.7 账号登录
  84. 第14章 物联网Python项目实战
  85. 14.1 项目简介
  86. 14.2 终端设备程序开发
  87. 14.3 网关程序开发
  88. 14.4 服务器端程序开发

FAQ

Will this book be too difficult for Python beginners to read directly?
The book is positioned to be readable by Python beginners and includes Python programming fundamentals and application examples. However, the IoT parts involve microcontrollers, gateways, and communication protocols, so it is advisable to first master basic syntax such as variables, functions, and classes, and to be prepared to learn by doing; slow down when encountering hardware content.
What hardware modules are needed to practice with this book?
According to the book, practice involves IoT microcontroller development boards that support MicroPython, as well as communication modules such as 2G, LoRa, and Zigbee. Specific models are explained with examples in the book; it is advisable to choose one communication solution first and then purchase the corresponding modules to avoid excessive one-time investment.
What framework is used for the Web backend part of the book?
The book uses the Python Django framework to develop the IoT Web backend and frontend, explaining related knowledge and examples. Readers can use this to understand how to connect device data to a backend and present it; if they already have experience with other Web frameworks, they can compare and transfer their understanding.
Is the second edition suitable for use as a course textbook?
The book's content is organized systematically from IoT composition, programming fundamentals, microcontroller and gateway development, and communication protocols to a complete project, and the book also states that it can be used as a textbook for related majors. Teachers can select or skip communication solution chapters according to class hours and use the large project as the vehicle for course design.

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.

About the author

安翔 Author

An Xiang is an author about whom limited public information is available. Two works by this author are included in the collection, one on computer technology and the other on cultural research. Internet of Things Python Development in Practice (2nd Edition) addresses IoT development practice, using Python as a tool to explain related technical applications, and belongs to the general computing category. The Historical Materials Methods of Soundscape Ecology and the Sounds of Beijing (with CD) turns to soundscape ecology and methods for organizing local sound historical materials, taking a cultural research approach and including audio materials. The two works span considerably different subjects, one leaning toward technical practice and the other toward sound culture and historical methods, suggesting that the author balances technical application with humanistic observation in writing. Since information such as dates of birth and death, nationality, and professional experience cannot be confirmed, no speculation is made here; this note briefly introduces only the subjects and approaches of the works for readers' reference.

More by the same author

Top rated in the same category