#100DaysOfWeb in Python Transcripts
Chapter: Days 9-12: FastAPI
Lecture: Concept: A minimal API endpoint

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Now that we built our first FastAPI endpoint, let's just review what it takes to get a minimal API endpoint up and running in an application.
0:10 Pretty simple. So we're gonna import FastAPI to use FastAPI, and then we have to have a server to run it. So we're gonna use uveicorn.
0:17 And we create an instance of the FastAPI object, calling it API, create a function, some kind of method that we're gonna call,
0:25 and we're gonna decorate it with HTTP verbs and their configuration. So an HTTP get against API/calculate, we'll run this right here.
0:36 And then we just say uveicorn.run, we pass it the API object, we say the host and we say the port, and that's it. We're off to the races.
0:44 We have our app up and running.


Talk Python's Mastodon Michael Kennedy's Mastodon