Guide Home Part 1 - FastAPI Foundations Part 2 - Building Applications Part 3 - Pages and HTML Part 4 - Security and Deployment Part 5 - Going Further Capstone Build Plan Markdown Source All Guides

Chapter 2: Understanding the Python Web Stack

ASP.NET Core applications run through Kestrel and an HTTP middleware pipeline. Python has two major web server interfaces:

FastAPI is an ASGI app. Uvicorn receives HTTP traffic, converts it into ASGI events, and passes those events to FastAPI. FastAPI delegates much of the low-level web behavior to Starlette.

Mental model:

ASP.NET CorePython/FastAPI
KestrelUvicorn, Granian, Hypercorn
WebApplicationFastAPI app object
Middleware pipelineASGI middleware stack
Minimal API endpointpath operation function
ControllersAPIRouter modules
Model bindingtype hints plus Pydantic
IConfigurationsettings class and environment variables
DI containerFastAPI dependencies plus manual composition

Python's ecosystem is less centralized than .NET. That means fewer official one-size-fits-all answers, but also less framework gravity. Your production skill is knowing which choices to standardize inside your own project.