The series: 1 OS → 2 Networking → 3 Security → 4 HTTPS walkthrough → AI from Zero to LLMs, with Go, Rust and Python alongside. Languages track: Go → C → Rust → Python.
You are here: languages track, step 4: Python, the bridge into AI. ← Previous: Rust — The Complete Field Guide. Next: AI from Zero to LLMs. Start the series at step 1: Operating Systems, Linux, and Containers.
🐍
Runs alongside the series
Python — The Complete Field Guide (Beginner → Expert)
A practical, example-driven path through Python: how the language really works, why it became the language of AI, and how to use it to build real tools, network services, security checks, data pipelines, and machine learning models.
Contents
84 chapters, one page each. Prefer one long page? Read the whole book on one page.
- How to use this guide2 min
- Table of contents3 min
- Part 0 — Start here
- 0.1 Setup: Python, uv, ruff, a type checker, and an editor2 min
- 0.2 The series: OS → networking → security → AI, in Python4 min
- 0.3 The Go ↔ Rust ↔ Python phrasebook2 min
- 0.4 The Python labs: what you build for each guide in the series1 min
- 0.5 Why Python runs AI, and where it does not belong2 min
- Part I — Foundations: the Python way
- 1. What Python is: CPython, bytecode, and the REPL2 min
- 2. Names, objects, and references: the model behind every Python bug5 min
- 3. Numbers, text, and bytes3 min
- 4. Control flow and pattern matching2 min
- 5. Functions: arguments, scope, and closures2 min
- 6. Collections: list , tuple , dict , set , and comprehensions3 min
- 7. Errors and exceptions2 min
- 8. Files, paths, and context managers2 min
- 9. Modules, packages, and imports2 min
- 10. 🔎 Checkpoint: names, objects, and collections1 min
- 11. Terminal project: a word-frequency counter1 min
- 12. Terminal project: a web access-log analyzer3 min
- Part II — Intermediate: idiomatic Python
- 13. Iterators and generators: lazy pipelines3 min
- 14. Decorators2 min
- 15. Classes, properties, and dataclasses2 min
- 16. The data model: making your objects feel built in2 min
- 17. Inheritance, composition, ABCs, and protocols2 min
- 18. Type hints that pay for themselves2 min
- 19. The standard library you will use every week2 min
- 20. Testing with pytest and Hypothesis2 min
- 21. Projects and packaging: pyproject.toml , uv , lockfiles2 min
- 22. 🔎 Checkpoint: generators, classes, and types1 min
- 23. Terminal project: pygrep , a tested grep clone2 min
- 24. Terminal project: an LRU cache with TTL, two ways3 min
- Part III — Advanced: internals, concurrency, performance
- 25. How CPython runs your code: bytecode, frames, and the specializing interpreter2 min
- 26. Memory: reference counting, the cycle collector, and __slots__3 min
- 27. The GIL, threads, and free-threaded Python3 min
- 28. Processes: multiprocessing and concurrent.futures2 min
- 29. asyncio: the event loop, tasks, timeouts, and cancellation3 min
- 30. Descriptors, __init_subclass__ , and metaclasses: how frameworks work2 min
- 31. Performance: measure first, then vectorize, cache, or go native2 min
- 32. Project: a parallel file hasher, four ways2 min
- Part IV — Systems Python: the OS guide in Python
- 33. Syscalls from Python: what open() really does2 min
- 34. Processes: subprocess done right, exit codes, and signals3 min
- 35. Files that survive crashes: fsync and atomic replacement1 min
- 36. Reading /proc : build your own ps2 min
- 37. mmap , shared memory, and pipes2 min
- 38. Python as a better shell: automation and a systemd service1 min
- 39. A container in 80 lines: namespaces with os.unshare2 min
- Part V — Network Python: the networking and HTTPS guides in Python
- 40. Sockets four ways: blocking, threads, selectors , asyncio3 min
- 41. A DNS client from raw bytes with struct3 min
- 42. HTTP/1.1 from a bare socket2 min
- 43. HTTP clients done right: timeouts, retries, pooling, and an SSRF guard4 min
- 44. A production API with FastAPI: validation, limits, and shutdown3 min
- 45. TLS and mutual TLS with the ssl module2 min
- 46. Project: an async service health checker2 min
- Part VI — Security-focused Python
- 47. Python's own attack surface4 min
- 48. Cryptography done right: secrets , hmac , AEAD, password hashing3 min
- 49. Web security in Python: injection, templates, and uploads2 min
- 50. Supply chain: lockfiles, hashes, audits, and trusted publishing2 min
- 51. Project: an auth service with Argon2 and JWTs2 min
- 52. Project: a log-based intrusion detector2 min
- Part VII — Python for data science and AI/ML
- 53. NumPy: arrays, broadcasting, and why vectorized code is fast3 min
- 54. pandas and Polars: tables, groupby, joins, and time series2 min
- 55. Plotting just enough: matplotlib1 min
- 56. scikit-learn: the fit/predict contract, pipelines, and leakage2 min
- 57. Autograd from scratch: the engine inside PyTorch in 120 lines4 min
- 58. PyTorch: tensors, nn.Module , and the training loop2 min
- 59. Hugging Face: tokenizers, models, and datasets1 min
- 60. Data pipelines for training: extraction, cleaning, dedup, JSONL2 min
- 61. LLM apps in Python: structured output, RAG, a tool-calling agent, an MCP server6 min
- 62. Experiment hygiene: seeds, configs, notebooks, and reproducibility2 min
- Part VIII — Open source walkthrough: inside requests
- 63. How to read a real codebase2 min
- 64. The call path: requests.get() to the socket9 min
- 65. The design lessons in requests3 min
- 66. Running the tests and making a change2 min
- Part IX — Expert and professional Python
- 67. Library and API design: making code other people can use3 min
- 68. Logging and observability1 min
- 69. Debugging: pdb , faulthandler , py-spy , and remote attach2 min
- 70. Shipping Python: containers, wheels, and GPU images2 min
- 71. How not to write Python: an anti-pattern catalog2 min
- 72. Capstone: one request, every layer, every guide, in Python7 min
- Appendices
- Appendix A — Traceback decoder: the 15 exceptions you will actually see2 min
- Appendix B — Tooling cheat sheet1 min
- Appendix C — Glossary2 min
- Appendix D — A 90-day plan1 min
- Appendix E — The guides, books, and codebases this guide draws on2 min
Generated from real-life-python-guide.md · 8 Oct 2026 16:36