1 00:00:00,630 --> 00:00:01,710 Hi, welcome back. 2 00:00:01,860 --> 00:00:09,420 In this video, we will learn new by some Web framework called Flask Flask. 3 00:00:10,020 --> 00:00:18,650 Source Code is a python web framework spelled with a small core and easy to extend technique. 4 00:00:18,660 --> 00:00:21,320 But the question here, why is Flass? 5 00:00:21,450 --> 00:00:30,810 I got Web framework, and the answer to this question is, as the following flask is more Pythonic than 6 00:00:31,260 --> 00:00:42,690 the design web framework because the equivalent flask application is more explicit than that Web application 7 00:00:42,690 --> 00:00:44,410 used for the same purpose. 8 00:00:45,210 --> 00:00:56,520 So it is easy for beginners because you can write a few lines of code for getting a simple flask up 9 00:00:56,520 --> 00:00:57,440 and running. 10 00:00:58,440 --> 00:01:07,670 So if we want to create a hello world web application using Flask, the first step to install filters 11 00:01:07,860 --> 00:01:12,930 using Web as the following web install Flast. 12 00:01:13,530 --> 00:01:24,480 So we will open the same Windows operating system or the terminal and Mac OS then type web install flask 13 00:01:24,690 --> 00:01:31,830 as the following, then click enter and Flass package will be installed. 14 00:01:34,880 --> 00:01:45,140 And after installation of last package, we will create a new file and click on Save as they create 15 00:01:45,140 --> 00:01:49,040 a new folder called Hello World. 16 00:01:50,330 --> 00:01:58,820 And then inside this folder, we will save our new folder as Hello World. 17 00:01:59,310 --> 00:02:06,540 But by then we will begin to cut our cap by importing flask. 18 00:02:06,590 --> 00:02:17,330 So from flask import flask with a capital F, then we will assign a variable called F as a following 19 00:02:17,510 --> 00:02:19,690 as a flask object. 20 00:02:19,850 --> 00:02:30,750 So epical flask between two parentheses double underscore name double underscore close the second parentheses. 21 00:02:31,160 --> 00:02:36,580 Now we will use the property of the app as the following. 22 00:02:36,770 --> 00:02:46,130 So at a dot route between two parentheses and two single quotes slash then add a function that contain 23 00:02:46,430 --> 00:02:49,770 the hello world as the following. 24 00:02:50,510 --> 00:02:55,910 So as we learned before, how to create a function. 25 00:02:56,660 --> 00:02:57,410 Yes. 26 00:02:57,890 --> 00:02:58,430 Hello. 27 00:02:58,430 --> 00:03:05,510 Underscore world between two parentheses and empty space then. 28 00:03:06,450 --> 00:03:07,050 Gholam. 29 00:03:08,110 --> 00:03:12,040 Then inside the function, we will return that ring. 30 00:03:12,960 --> 00:03:21,270 Between two single codes, hello, was each capital coma world was. 31 00:03:22,390 --> 00:03:24,460 W cabrito. 32 00:03:25,670 --> 00:03:27,440 Then exclamation mark. 33 00:03:29,190 --> 00:03:34,470 Before we end with the second single court. 34 00:03:36,120 --> 00:03:42,500 Finally, we want to run our app, so we will use the following statement. 35 00:03:42,570 --> 00:03:54,540 So if double underscore name named underscore the word equal between two single code, double underscore 36 00:03:54,540 --> 00:04:04,080 means underscore then column, then inside the F statement, we will use the Trump method so that run 37 00:04:06,060 --> 00:04:07,640 then build our project. 38 00:04:08,760 --> 00:04:17,880 So in the sublime text console window we get that our app is running at the local server, which is 39 00:04:17,880 --> 00:04:30,690 running at each DTV column slash slash one hundred twenty seven point two point 0.01 column, five thousand 40 00:04:30,870 --> 00:04:31,590 slash. 41 00:04:32,430 --> 00:04:39,090 And also it tells me that I can press control and C to quit Xining app. 42 00:04:39,570 --> 00:04:51,840 So I will covid this web address and go to and invested in our Web browser to go to our local host and 43 00:04:51,870 --> 00:04:56,020 check the running flask app as the following. 44 00:04:56,610 --> 00:05:07,200 So I will copy this link at this Zen best and the new window of my Google Chrome Web browser. 45 00:05:07,650 --> 00:05:16,680 Then go to the link, which is a localhost, and we can observe that when we go to the local server 46 00:05:16,680 --> 00:05:21,810 that our app is running okay without no problem. 47 00:05:23,440 --> 00:05:26,110 At this point, we reached the end of this lecture. 48 00:05:26,170 --> 00:05:28,910 I hope you enjoy this lecture and get all of that. 49 00:05:29,290 --> 00:05:32,130 Thanks for watching and thanks for being here. 50 00:05:33,130 --> 00:05:34,840 See you next video.