商品描述
Chapter 1 (Installing Python)
Different ways to install Python:
- Compiling from source
- OS packages
- pyenv
Chapter 2 (Packaging) (31 pages - 11 new pages)
How pip works and how to build packages.
The following sections need to change
Section about pip (adds 4 pages)
- Add explanation about how the resolver works
- Explain pip-compile
Poetry and pipenv (changes 2 pages, adds 2 pages)
- Needs to be separated into two sections
- Poetry section updated to reflect changes in Poetry- Pipenv section updated to reflect changes in Pipenv
4setup.py and wheel (rewritten, changes 1 page, adds 2 pages)
- python -m build and setup.cfg
- Add details about binary wheels and manylinux
- Show a complete example
Chapter 3: Interactive usage
How to use the interactive interpreter, other text-mode interactive consoles, and Jupyter.
Chapter 4: OS Automation (16 pages - 4 new pages)
Automating OS-related things like files and processes.
Section about files (2 pages added)
- Cover using struct to parse binary data- Cover pathlib
New section: low-level networking (2 pages) Cover socket, socket options, and how it relates
to TCP networking.
5 Chapter 5: Testing (30 pages - 10 new pages)
Writing unit tests for DevOps code.
Section about testing files (4 pages added)
- Improve performance of file testing using tmpfs and preloading libraries
- Add information about temporary directory context manager
Section about testing networking (4 pages added)
- Show how to test httpx with the WSGI support
- Show how to test low-level socket networking with DI
Section about testing processes (2 pages changed)
- Mention run and Popen
- Show how to write tests with DI on run and Popen
6 Chapter 6: Text manipulation
How to work with text: searching, modifiying, formatting, etc.
Chapter 7: Requests -> httpx (rewritten - 10 new pages)
- Focus on httpx instead
- Cover async usage
Chapter 8: Cryptography
Symmetric and asymmetric encryption and digital signatures, and how to use them in DevOps
code.
Chapter 9: Paramiko
Using paramiko to automate SSH use.
Chapter 10: Salt Stack
Using salt stack and writing new modules.
Chapter 11: Ansible
Using ansible and writing new modules.
Chapter 12: Docker (5 new pages)
- Clean up examples - they are hard to read
- Show complete example of layering, not just talk in theory
- Show complete example of running, not just talk in theory
- Add section about how to build containers for Python applications
Chapter 13: AWS
Automating AWS using the boto3 library.
New: Chapter 14: Kubernetes (10 pages)
Chapter goal: Learn how to automate k8s with Python and how to run Python applications on k8s
- Packaging Python applications for kubernetes
- Using secrets
- Thinking in Pods
- Automating k8s from Python using the REST API
- Writing k8s operators with Python
New: Chapter 15: Terraform (5 pages)
- Using the Terraform Python CDK
- Generating Terraform JSON from Python
商品描述(中文翻譯)
第1章(安裝Python)
安裝Python的不同方法:
- 從源碼編譯
- 作業系統套件
- pyenv
**第2章(打包)(31頁 - 11頁新內容)**
pip的工作原理以及如何構建包。
以下部分需要更改
有關pip的部分(增加4頁)
- 添加有關解析器如何工作的解釋
- 解釋pip-compile
Poetry和pipenv(更改2頁,增加2頁)
- 需要分為兩個部分
- 更新Poetry部分以反映Poetry的變更
- 更新Pipenv部分以反映Pipenv的變更
setup.py和wheel(重寫,更改1頁,增加2頁)
- python -m build和setup.cfg
- 添加有關二進制wheel和manylinux的詳細信息
- 顯示完整示例
第3章:互動使用
如何使用互動解釋器、其他文本模式互動控制台和Jupyter。
**第4章:作業系統自動化(16頁 - 4頁新內容)**
自動化與作業系統相關的事務,如文件和進程。
有關文件的部分(增加2頁)
- 涵蓋使用struct解析二進制數據
- 涵蓋pathlib
新部分:低級網絡(2頁)
涵蓋socket、socket選項及其與TCP網絡的關係。
**第5章:測試(30頁 - 10頁新內容)**
為DevOps代碼編寫單元測試。
有關測試文件的部分(增加4頁)
- 使用tmpfs和預加載庫提高文件測試性能
- 添加有關臨時目錄上下文管理器的信息
有關測試網絡的部分(增加4頁)
- 顯示如何使用WSGI支持測試httpx
- 顯示如何使用DI測試低級socket網絡
有關測試進程的部分(更改2頁)
- 提及run和Popen
- 顯示如何在run和Popen上使用DI編寫測試
第6章:文本操作
如何處理文本:搜索、修改、格式化等。
**第7章:Requests -> httpx(重寫 - 10頁新內容)**
- 專注於httpx
- 涵蓋異步使用
第8章:加密
對稱和非對稱加密及數位簽名,以及如何在DevOps代碼中使用它們。
第9章:Paramiko
使用paramiko自動化SSH使用。
第10章:Salt Stack
使用salt stack並編寫新模組。
第11章:Ansible
使用ansible並編寫新模組。
**第12章:Docker(5頁新內容)**
- 清理示例 - 它們難以閱讀
- 顯示分層的完整示例,而不僅僅是理論討論
- 顯示運行的完整示例,而不僅僅是理論討論
- 添加有關如何為Python應用程序構建容器的部分
第13章:AWS
使用boto3庫自動化AWS。
**新:第14章:Kubernetes(10頁)**
**章節目標:學習如何使用Python自動化k8s以及如何在k8s上運行Python應用程序**
- 為kubernetes打包Python應用程序
- 使用secrets
- 以Pods的思維方式
- 使用REST API從Python自動化k8s
- 使用Python編寫k8s運營商
**新:第15章:Terraform(5頁)**
- 使用Terraform Python CDK
- 從Python生成Terraform JSON
作者簡介
作者簡介(中文翻譯)
Moshe 自 1998 年以來一直參與 Linux 社群,協助舉辦 Linux 安裝派對。自 1999 年以來,Moshe 開始編寫 Python 並對核心 Python 解譯器做出貢獻。Moshe 在 DevOps/SRE 領域工作,早於這些術語的出現,對軟體可靠性、建置可重現性及其他相關事務深感關注。他們曾在小至三人的公司和大至數萬人的公司工作,通常是在軟體與系統管理交匯的地方。