FastAPI, as its name suggests, is primarily intended to be a library for API development. However, it can very well be used to build web apps of traditional type, that is, the ones rendering web pages, images, and other assets.
In this chapter, we shall learn how FastAPI renders web pages with the help of templates.
HTML response
Template engine
Hello World template
Template with path parameter
Template variables
Serving static assets
HTML form template
Retrieve form data ...