Flask is a micro web framework written in Python. It is classified as a micro-framework because it does not require particular tools or libraries. Flask is a lightweight WSGI web application framework. It is designed to make getting started quick and easy, with the ability to scale up to complex applications. Wikipedia is a Python library that makes it easy to access and parse data from https://www.wikipedia.org/.
1) In order to create the flask app we have to first install the flask.
pip install flask
2) In order to extract the data from Wikipedia, we must first install the Python Wikipedia library.
pip install wikipedia
Create a flask app:
3) Create a file and name it as app.py
4) Create the templates folder to store all the html files.
How to create wikipedia search app using Flask Framework?
Now, let’s start coding the application
Create the file – app.py
Create a file index.html that will be used by flask –
If we search INDIA in this input tag then the output is:
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course