You are on page 1of 5

Student name: Baiandy Seifolla

Group name: CS2116N


Teacher name: Zhantileuov Eldiyar
Project name: Assignment 3
Project type: Individual

INTRODUCTION
It was necessary to create an application for displaying data about the country
being entered through REST API . It is also necessary to create a database and
connect to the FLASK drive, the information must be searched from the
database after the REST API

MAIN PART
First I installed the Flask, request, flask_sqlalchemy add-ons and then imported
them. I created a templates folder where I placed the index and result html
files.Created a class where I placed colums then connected with blog.db.

app.config["SQLALCHEMY_DATABASE_URI"] = "sqlite:///blog.db"

Then I turned to index.html with the help of the function , the index will contain
a string for input.
further, with the help of get post methods and also links to the rest of the
country, I called the necessary arrays from API .
country = request.values['country']
url = 'https://restcountries.com/v3.1/name/' + country
with the link “https://api.openweathermap.org” we display the weather
in the capital of the country.
at the end, through the return render_template command, I display these
values through the result. as a result, I specify the variables for output and also
create a button

You might also like