Locked learning resources

Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Locked learning resources

This lesson is for members only. Join us and get access to thousands of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Running the Project - User Test Your App

Music: Living Voyage by Kevin MacLeod is licensed under a Creative Commons Attribution 4.0 license. creativecommons.org/licenses/by/4.0

00:00 Before committing to the state of the FastAPI app that the agent built for me, I want to test and see whether it actually works. So I can go in here and say the API will be available at the localhost.

00:12 And this is also cool, so I’m switching back to the agent tab because I want to show you also how you can run this right inside of Cursor. Okay so it says that it’s going to be available at localhost.

00:23 All right, should be fine. And I want to say please, oh yeah I gotta switch on connect to browser. So I’m going to say I want a browser tab. Okay, “Please run the project so

00:37 I can view it in the browser.”

00:49 Okay, so now I can go ahead and open it. So I’ll take the URL and paste it right here inside Cursor. You could also do this in your browser obviously, this is just, it’s running a local server, and so you can access it also locally, but this is convenient because it opens it up inside Cursor.

01:07 This is maybe a nice thing about the agent interface, because here you have space for viewing the rendered web project, and maybe you don’t need to see the files at the moment for, you know, just inspecting the app and seeing what it does.

01:21 Okay so, because FastAPI comes with this nice interactive documentation, I can also go ahead and test it out. So I want to try it out and add something. I want to say Python and execute,

01:38 and then let’s add another language. Let’s add JavaScript – execute, and then I should be able to get all items. And then there should be two of those items inside of my database.

01:52 Don’t need any parameters. And indeed I get back those two items that I just added. So now I have two items with a created timestamp, a value, and an automatic ID.

02:04 And now I should be also able to go ahead and return those in randomized order. That is not going to be super interesting with just two items, but let’s try it out anyway.

02:14 “Input should be a valid integer, unable to parse strings as an integer.” Okay, so this is expecting some input, but it says “Unprocessable content.” Okay, so it’s expecting an integer.

02:24 Maybe it’s expecting an integer on how many items I would like to get back or what ID, so I’m not actually sure what is happening here. So let’s go ahead, and I could go over to the code to figure it out.

02:34 But let’s continue using Cursor features. And yeah, this is something I want to show you in the next lesson, how you can use also this built-in browser to debug if there is some functionality not working in the way that you would want it to.

Become a Member to join the conversation.