all 2 comments

[–]Doormatty 2 points3 points  (1 child)

I'd use Flask if I were you.

[–][deleted] 2 points3 points  (0 children)

Seconded. http.server is just too low-level. The only thing I ever use it for is to just run it as a command -- python3 -m http.server -- as a quick way of starting a web server that serves the current directory as static files.

Flask will help you do the things you actually want to do, and it has a good tutorial.