Placeholder Image

Subtitles section Play video

  • All right.

  • So, uh, welcome back to another stream and another video.

  • What I've done now is I've created just a little bit of, ah notes for my intro because I just wanted to mention something a little bit quickly before you get started.

  • Because today what we're gonna do is we're gonna try to build out the wrist a p i for this app that we've been building the last couple of days, the last couple of videos and, uh, what I wanted to mention before we start.

  • It's just that I'm not an expert at this and, like building rest AP ice is something that is completely new to me.

  • So are built somewhat of arrest FBI like, two times before.

  • I think, using flask and python, which is what we're going to use today as well.

  • For this rest a p I and ah, also as like, kind of the purpose of this series or this stream.

  • The stream sessions is to show for me to basically be ableto build this app, which I would have been building anyway.

  • So I think that I sense I would have been building this app.

  • Either way, it makes sense to just share it with you guys live so that you can see kind of the entire process of me building, building this out and just me making mistakes and trying to figure out how to solve these different things.

  • Um, so let's let's take a look again at the notes.

  • So what I try to do hard with my normal videos I do on YouTube is I really tried to show that I like exactly how it is, how good or bad I am a coding.

  • But it's sometimes one of those things where if a video turns out to be like 30 minutes long and 15 of those minutes is being spent just on the same problem over and over trying to solve it, I might have to cut that out just because a 15 minute video tends to do a lot better than a 30 minute video.

  • So I try to keep them short.

  • So but I tried to keep in some errors that I do just to kind of show a realistic picture of what it looks like when I code, and what I've been getting the impression of is that some people seem to think that I'm like some god when it comes Thio programming encoding.

  • So and that's not really the case that old.

  • And that's kind of why I feel like this.

  • Siri's is a good way to really show exactly how it is and exactly what it looks like.

  • I don't catch anything out, and it's just what I'm doing here is exactly how good or bad I am a coating which I think is really good.

  • I think I haven't really seen anyone else do do an entire live build oven app from zero to a complete finished app that's published s Oh, that's also one of the ideas with and then also this stream kind of build some interest, hopefully in the apple on building, so that when I do really sit, maybe some some of you guys will want to download It s so that's kind of the idea with it anyway.

  • And I also consider these streams not just pure tutorials, since I'm also learning these things myself as I'm building it out, I consider him kind of a mix between tutorials and also kind of just hangouts where I'm coding.

  • Maybe you're following along and coding along with me.

  • Or maybe you're building something else out.

  • Maybe you're just having this on in the background, so it's not as formal.

  • It's like a tutorial, since I'm actually, like exploring some of these things myself in the stream.

  • So with that said a little bit of a long intro.

  • But now we're gonna get into actually building out the rest A p I So what I've done, Yes, I've created a I think I mentioned this last time in the last stream or video, and that is that I've created kind of an outline for what I think we're gonna need in order all of the classes and, uh, then so this is essentially what we're gonna have to build out today.

  • We're gonna try to get the daughter base set up and then also get in to get the flask app up and running, and then we'll go through and try to create all of classes that we're going to need and then insert that into the table and kind of get the very, very basic functionality of the A p I or daughter base up and working.

  • So we're going to start with just creating the daughter base, and we're gonna use prosperous.

  • So they're different types of daughter basis You can use sequel is like the main one, as far as I'm No.

  • So I'm going to use pasta, Chris, which is called, like, cost gris Que el, which is based on the X SQL language.

  • So what I'm gonna do is I'm gonna first start by just checking how to actually create the daughter base, because I don't remember that command.

  • Um, because I think you can just start it straight from the terminal.

  • Okay, I think this is the one what we'll call it ISS productivity, huh?

  • So this command should create a new, uh, daughter base for us called the daughter base will be called productivity app.

  • And I also think that it will open up the daughter based for us so that we'll get actually into it.

  • I'm not quite sure, but I think it's yet no involved.

  • Argument.

  • P s U l Okay, copy.

  • The wrong one changed the year, sir.

  • All right, maybe we'll just open a prosperous, and then we'll go into it, and that will create the daughter base inside.

  • Well, just make sure that we actually have it.

  • Okay, so we have it running.

  • Okay, so now we're hitting the daughter base.

  • Now, we just need to create the daughter base.

  • Uh, all right, create right.

  • Three.

  • Thought obeys.

  • And then now we can name it.

  • So product Thio too.

  • Uh, all right.

  • So this should then create our daughter base for us, which I think it did now, because wait product to the, uh I think you always have to end it with something like that.

  • Syntax, error near.

  • Create.

  • This is something that I yeah, sometimes.

  • Which I'm not sure why, but sometimes when you paste or when I paced, it tends to not work.

  • Even though it's, like, spelled correctly, we're gonna try it with lower case.

  • Should work with Lower case is well, I think product to be, uh, shit, uh, create allo bays.

  • All right, Why did that not work, All right.

  • I think at Nino seven, if that's what you say.

  • I think that's Yeah.

  • All right.

  • So we created the daughter base.

  • Um, how that works.

  • See, everything's gonna be a little bit of a struggle right now because I'm so not used to this.

  • Um so therefore, the kind of spiel at the beginning.

  • Um, all right, it's No, We've got our daughter based created.

  • That was essentially all that we wanted to D'oh.

  • Now we can get into the more of the flask stuff.

  • Um, all right, so what I did was essentially just Googled rest a p i with python and flask.

  • And, uh, we're going to follow this a little bit quickly through and just get it set up.

  • Um, all right, we're gonna open up a new terminal window, and then we're going to go into our project.

  • Uh, what was this one cold again?

  • It was called.

  • What do we call it to Dio Much?

  • Yeah, I think they called it to d'oh.

  • To Dio.

  • Yeah, right.

  • So, no, he creates a new directory cold back.

  • And we're just gonna be where you keep all of the back end stuff.

  • And you do get, uh, uh, back and okay.

  • And then we have that.

  • Now we go into back end, and then we open this up in visual studio code.

  • Okay, there we go.

  • You're gonna have this here for now.

  • Uh, what I think we need to do is we need to create a virtual environment as well.

  • So we'll create a virtual environment.

  • Pull that end, enter and then that should set that up.

  • All right, so now we have the virtual environment.

  • Now let's go into its source, and and then what is it being activates?

  • And then now we're in our virtual environment, and that is just so that we can install some of the things a little bit more specifically to this project.

  • Okay, Now we'll follow this.

  • Make their part, isn't it?

  • Make every sources okay.

  • I'm not sure that we're gonna need the Hello Don Pi on the following too.

  • Apartment stop text.

  • Okay, so this is what they outlined that we're going to need.

  • We're going to need all of these different files, essentially, which is gonna be wrapped up by migrate Popeye model a pie and requirements text and then run.

  • Dupuy, I think that this part of it is just for like, I think it's gonna be a basic website or something like that that they've got.

  • So I'm not sure that we're gonna need that.

  • Um, all right, so we're gonna just go ahead and add all of those files.

  • Yep.

  • We're just gonna have the files.

  • All right.

  • Um, there we go.

  • Lets out a file pie at another one.

  • What about this one?

  • My great pie.

  • I think this is the one that migrates.

  • So you basically create all of the stuff that's gonna get put into the daughter base within the python or the flask, and then what you do with you, I think you run migrate dot pie.

  • You do it with some in some special way and basically that lead insert all of the tables and all this stuff into the daughter based for us, so we don't have to do that manually.

  • And yeah, I think that's what migrate up I will do.

  • And then we have modeled a pie.

  • But we're going to call that mo dose.

  • Don't lie on DDE.

  • Then we're gonna have requirements.

  • Rick.

  • Oi!

  • All right, tucked out.

  • Okay.

  • And then we'll just add all of this stuff into the requirements that takes, like they said, save that, and okay, they're just explaining all the packages, which we don't really care about.

  • Okay.

  • And then Pip in stall requirements.

  • Okay, that will Then go ahead and stole everything for us.

  • Okay?

  • then we should add config.

  • Duck pious.

  • Well, and then we'll add whatever he said we should add into that one.

  • I'm not sure how interesting this will be.

  • This is just going to essentially be me setting everything up.

  • Um, which isn't super interesting.

  • I don't think, but this is also like I said, I wanted to build everything out live.

  • So we're essentially building everything out.

  • Live conflict a pie import.

  • Okay, copy this.

  • And at this to convict on fire, we're gonna rename this, uh, fraud activity.

  • Okay, so we're essentially before it's a daughter base or something like that.

  • We rename it to the daughter based name that we gave our rescue, and always, uh, not sure if we need thio actually replace anything here, but we'll see what happens when we test run it.

  • Uh, okay.

  • Create the after pie entry points.

  • A guy from resource is does.

  • Hello.

  • Okay.

  • We're just gonna see what they add to a low and then depending on what they add.

  • Hello, DuPuy class.

  • Hello, resource.

  • Definitely itself.

  • Return message.

  • Hello, World.

  • Okay.

  • In a low class, we define the function.

  • Get this means that any get requests on the helo en pointe will be hitting this function.

  • Okay, I think that's actually a good thing to have, because from what I understand it, it's going to be essentially that we add end points here and that will then call all of these or this file.

  • So essentially here, we can add all of the get get put post delete all those requests.

  • There are different types of requests that you can have when you make an A P.

  • I request.

  • So, uh, essentially, it's kind of good to have them all structured in a nice way.

  • So we're gonna actually create that folder.