![]() |
VOOZH | about |
In this article, we are going to build Covid Vaccine Availability Checker using Flask Server.
We all are familiar that the whole world is suffering from the pandemic and the only thing which helps us to come out from this situation is mass Vaccination. But as we know due to the large population of the country it is very difficult to find vaccines in our nearby areas. So now technology comes under the picture and we will build our own covid vaccine availability checker which finds the availability of vaccines in our nearby areas.
We will be using some python libraries to find the availability of vaccines and display them using a flask server. In future, you can deploy it also on the real-time server. First of all, we have to install the python Flask Package using the below command:
pip install flask
After installing the python flask package, Open Pycharm or any IDE (Preferably Visual Studio Code) and make a new project. After this make a main python file app.py and two folders named templates and the other is static (name of the folder must be same as it is written).
Below is the image representing the Directory Structure of the project.
Step 1: In this first step, we have to import python libraries which we will use further in the project. Also, make an app of the Flask server.
Step 2: Adding the routes to handle the client requests.
Step 3: This is the main step of our project which finds the availability of vaccine (findslot() function that will do the following things):
Below is the Full Implementation of app.py
Step 4: Now make three files in the templates folder.
index.html code
slot.html
noavailable.html
Add the images or other files (if you have them) to the static folder.