Modern APIs with FastAPI and Python Transcripts
Chapter: Course conclusion and review
Lecture: Review: Deployment
0:00 Finally, after building and perfecting our API, we said We want this to live on the Internet so it could be consumed by
0:07 applications and all sorts of stuff like that. So we ended up picking some kind of virtual machine.
0:13 We use Digital Ocean, but you could use any of them, really. And it's more or less the same.
0:17 We have our Ubuntu image and we said we're gonna install NGINX and Gunicorn. Gunicorn is going to run a bunch of uvicorn worker processes
0:26 like this and over in uvicorn, this is where our Python code is going to run. Our request is going to come in over https, and set up and configured by
0:35 Let's Encrypt, and that's gonna internally either go through http or direct sockets on Linux
0:41 and Gunicorn is going to be in charge of figuring out which worker process is not busy as these requests come in and delegate it out.
0:48 So this is a really, really great architecture for hosting and serving our API. It's quite similar, actually,
0:55 to what we're running over at Talk Python training. We're not using FastAPI, I wish we were, but it was written before that existed.
1:01 But the general architecture of how we're doing the deployment and whatnot is quite similar.
1:06 Remember, I gave you a bunch of scripts and configuration files. So mostly this is about understanding what's happening,
1:11 making minor tweaks to pass, and then just running those scripts, you know, step by step to make sure everything works,
1:16 and you'll have your server set up and ready to go.