Frontend Labs
⋯
🐍

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.

84 chapters · 3 h 23 min of reading

Contents

84 chapters, one page each. Prefer one long page? Read the whole book on one page.

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

Generated from real-life-python-guide.md · 8 Oct 2026 16:36