Full Web Apps with FastAPI Transcripts
Chapter: Welcome to the course
Lecture: APIs or web apps?
0:00 Hello and welcome to Full Web Applications with FastAPI. Applications,
0:06 that's the key word about what we're gonna build in this course.
0:10 FastAPI well, it has API
0:12 right in the name, it's really, really good at building web APIs.
0:18 But, as you will learn during this course,
0:20 it's also really, really good at building web applications.
0:24 Many of the cool, modern features of FastAPI can,
0:28 with a very small amount of effort,
0:31 be applied equally to web applications, those that generate HTML for browsers and humans,
0:37 as it does for JSON, which is intended for computers and computer software to exchange
0:43 data with each other. So let's start with this really important question here.
0:48 Should you be focused on building an API or a web app? In the
0:53 API, we're going to build applications that exchange JSON,
0:57 they deeply leverage the HTTP verbs like GET PUT POST DELETE and so on and they
1:02 exchange data that is generally unseen.
1:06 Just a little progress bar spinning in you're app
1:08 and then data appears, or do we want to build some kind of web application?
1:13 Somewhere on the Internet users go and type and they show up on your page and
1:17 they've got really cool dynamic HTML.
1:19 They can go over, maybe create an account.
1:21 They log in, they interact through their web browser.
1:24 Now, this is a challenge that basically everyone has to deal with
1:27 if they're building a rich application,
1:30 say a mobile app, and they're going to build a website that corresponds to it.
1:35 So often this is presented as APIs versus web apps.
1:40 I maybe want to build some API or use an API framework
1:44 like FastAPI, so that I have this great way to build APIs
1:47 And then we'll go find another way to build that web app or we've
1:50 already got our web app. How do we add an API to it?
1:53 Do we have to completely start over? Good news,
1:56 what you're going to see in this class is that it's not "or" or "vs" or anything
2:00 like that. No, it's "together".
2:01 I will show you how to build APIs in FastAPI
2:05 and then mostly we will focus on building fantastic web applications. We have another course
2:11 that focuses purely on building the APIs,
2:12 but the interesting point here is how do I take this really powerful
2:16 and modern API framework and allow it to also serve web applications, web UIs
2:22 out of the exact same data models, out of the exact same code base?
2:27 So you don't have two things to deploy,
2:29 two things to manage, two things to run.
2:31 It's not like, well, let's use FastAPI for the APIs an then
2:35 completely start over and use Django for your web app.
2:38 No, it's FastAPI through and through,
2:41 And you're gonna be able to blend them together within the same application with the same
2:46 versioning, the same deployment, everything. It's going to come out with one of the
2:50 best web frameworks, not just API,
2:53 but web frameworks that you can use for modern Python web applications. You're gonna see how to unlock that power in this course.