Python Jumpstart by Building 10 Apps Transcripts
Chapter: App 5: Real-time weather client
Lecture: App start

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Well, let's create our application,
0:01 our project, to build our weather client here. We're gonna say "new project",
0:06 and we're gonna create it in the "weather_client" folder on my desktop,
0:09 then I'll move it into the GitHub Repository. It's gonna be using the Python 3.9
0:12 interpreter, just the system one for now,
0:14 we'll talk about what that means in a minute,
0:16 and I'm not gonna use this main script, welcome script,
0:20 that PyCharm just added to its functionality for new projects.
0:23 Over here we have our empty project and I'm gonna add,
0:27 as we do for all of these, a new Python file and we'll call it "program".
0:29 Then just to get the little button lit up here,
0:33 let's go ahead and, once it's done
0:36 indexing, right click and say
0:37 Run. Run it, and of course it does nothing,
0:40 but you can see it's now ready to run with the hotkeys or with that little button
0:44 there. So what are we going to do in our program?
0:46 Let's just write these out as steps.
0:48 Well, we're going to show the header and we're gonna get the location requests, or
0:54 the city, where do you want to get the weather for. We're gonna convert what they type
0:59 in into more useful data. What they're going to type is something like, they're gonna
1:04 enter, you know, maybe Portland,
1:06 Oregon as a whole single string here.
1:08 And what we want to know is both
1:10 Portland is the city, and Oregon is the state,
1:12 and the default is that the country is the United States or something like that.
1:17 So we're gonna convert plain text over to data we can use. Once we have that data
1:24 for the city and the country and state and all those sorts of things, we can
1:28 get the report from the API, the actual weather API that we're
1:32 going to use, and then the last thing, we're gonna report the weather. What we're
1:36 gonna get back from the API
1:37 is structured data, and we want to take pieces of that data and turn it
1:41 into something that's friendly to humans.
1:43 Like "the weather is gonna be 57 degrees and sunny",
1:46 Not "here is some
1:48 data structure that the API returned".
1:49 So that's what this last thing here is going to be about.
1:53 So these are the steps that we're gonna have to take to build this simple application.