Foundations#

Web fundamentals, OS concepts, and core programming patterns. By the end of this section you will understand how the web works, how Python handles concurrency, and how the operating system manages I/O at the lowest level.

Topics#

  • Web Concepts — HTTP protocol, client-server communication, URL structure, REST principles, and JSON data exchange

  • Threads vs Processes — Concurrency fundamentals: threads, processes, the GIL, thread pools, and Unix fork

  • asyncio — Python’s cooperative multitasking framework: event loops, coroutines, and async/await patterns

  • Greenlets — Lightweight concurrency with manual context switching and how SQLAlchemy bridges sync and async code

  • File Descriptors — How the OS represents I/O resources as integer handles, selectors, and non-blocking I/O

  • Event Loop — Building socket servers, event-driven I/O with selectors, and understanding event loop internals

  • CPython Internals — How CPython provides fast C implementations with pure Python fallbacks for standard library modules

Prerequisites#

None.