Skip to content

Introduction

If you're looking to build robust APIs using Python quickly, look no further than the FastAPI web framework for Python. It's a high-performance web framework for building APIs with Python 3.7+ based on standard Python type hints.

FastAPI will feel familiar if you've used Django, Django REST framework or Flask. However, FastAPI is built with an asynchronous programming paradigm. Moreover, as the name suggests, the built-in API documentation using Swagger makes it fast and easy to build web applications.

With FastAPI, you can easily create well-structured, high-performance, and secure APIs. FastAPI is built on top of Starlette and includes most of the features of Starlette. However, it also has additional features, making it an excellent choice for building APIs and web applications.

This section covers setting up a solid FastAPI project foundation that can be a starting point for any future project.

And it's worth noting that any course or book on FastAPI only elaborates the official docs. The documentation here is no exception. However, I aim to offer a more full-stack walk-through and provide more real-world usefulness.

The following information offers practical examples to get started. With all that said, things in the technology world move quickly, so always refer to the official documentation found here https://fastapi.tiangolo.com.

Package Versions

The earlier version of this documentation where done before Pydantic version two was released. When version two was released it broke quite a few things. Rest assured that all those problems have since been resolved, and this version of my documentation is done using the latest version of FastAPI and Pydantic.