Chapter 10: Deploying a FastAPI Project

Building a good application is great, but it's even better if customers can enjoy it. In this chapter, you'll look at different techniques and the best practices for deploying your FastAPI application to make it available on the web. First, you'll learn how to structure your project to make it ready for deployment by using environment variables to set the configuration options you need, as well as by managing your dependencies properly with pip. Once done, we'll show you three ways to deploy your application: with a serverless cloud platform, with a Docker container, and with a traditional Linux server.

In this chapter, we're going to cover the following main topics:

  • Setting and using environment variables ...

Get Building Data Science Applications with FastAPI now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.