Modern APIs with FastAPI and Python Transcripts
Chapter: Course conclusion and review
Lecture: Review: Deployment

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Finally, after building and perfecting our API,
0:03 we said We want this to live on the Internet so it could be consumed by
0:06 applications and all sorts of stuff like that.
0:09 So we ended up picking some kind of virtual machine.
0:12 We use Digital Ocean, but you could use any of them,
0:14 really. And it's more or less the same.
0:16 We have our Ubuntu image and we said we're gonna install NGINX and Gunicorn.
0:19 Gunicorn is going to run a bunch of uvicorn worker processes
0:25 like this and over in uvicorn,
0:27 this is where our Python code is going to run.
0:29 Our request is going to come in over https, and set up and configured by
0:34 Let's Encrypt, and that's gonna internally either go through http or direct sockets on Linux
0:40 and Gunicorn is going to be in charge of figuring out which worker process is
0:44 not busy as these requests come in and delegate it out.
0:47 So this is a really, really great architecture for hosting and serving our
0:52 API. It's quite similar, actually,
0:54 to what we're running over at Talk Python training.
0:56 We're not using FastAPI,
0:58 I wish we were, but it was written before that existed.
1:00 But the general architecture of how we're doing the deployment and whatnot is quite similar.
1:05 Remember, I gave you a bunch of scripts and configuration files.
1:07 So mostly this is about understanding what's happening,
1:10 making minor tweaks to pass, and then just running those scripts,
1:13 you know, step by step to make sure everything works,
1:15 and you'll have your server set up and ready to go.