Hey, welcome back.
This is my solution to the current task of building a simple API.
So that's my main dot pi file.
It takes care of two routes the home page routing and the URL pattern routing of the API.
So the home page renders the home.
That HTML document which is hosted in my templates folder and it looks like this.
And on the front end it looks like this.
So that's the home that documents and when the user visits.
A you have to get the API response like that.
I return this dictionary with the words capitalized, so any word that the user enters here is capitalized.
And I did that using this API function.
So the user's word goes in here and then it goes in here.
And from there goes here and here it is uppercase.
It's capitalized using the upper method, which capitalizes all the letters of a string.
The result is saved in the definition variable.
And then I serve the definition variable to this dictionary here.
So I constructed the dictionary and then I returned the dictionary.
And when the users visit this URL, that's what they see that dictionary and that's it.
Then I serve this in the sport.
5001.
And that's a complete code for this exercise.
In the next day, we're going to serve the actual definition of any words, and for that we're going
to use some data.
So let's talk back tomorrow.