paint-brush
Apply This Technique To Serve HTML Via Templates With FastAPIby@fastapitutorial
2,119 reads
2,119 reads

Apply This Technique To Serve HTML Via Templates With FastAPI

by FastapiTutorial.com4mMay 12th, 2021
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

We will be using Jinja2 as our templating language. We are using the APIRouter of fastapi.com to serve webapps. We need to implement a navbar and a simple message on our homepage. We could have kept all this code in the main.py file but as our codebase grows we will find it to be messy. So, we are trying to keep our code base clean from the beginning. This I am doing to follow the DRY(Don't Repeat Yourself) principle.

Company Mentioned

Mention Thumbnail
featured image - Apply This Technique To Serve HTML Via Templates With FastAPI
FastapiTutorial.com HackerNoon profile picture
FastapiTutorial.com

FastapiTutorial.com

@fastapitutorial

We are on a mission to bridge the gap between Tutorial hell and Industry.

Learn More
LEARN MORE ABOUT @FASTAPITUTORIAL'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

FastapiTutorial.com HackerNoon profile picture
FastapiTutorial.com@fastapitutorial
We are on a mission to bridge the gap between Tutorial hell and Industry.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite