FastAPI is a web microframework that lets you build highly performant, highly scalable APIs in Python. FastAPI is newer than the widely used Flask or Django. Other than being easy to use, there a few key reasons to choose FastAPI over other API frameworks:
- Quick to build APIs from scratch
- Documentation is autogenerated as you build your apps
- (most important) You can set the types your endpoints are expecting to receive, meaning no need to waste time adding data validation to your APIs
Watch the full tutorial below for an overview of FastAPI, how to set up your first API, and the quick advantages of the framework. You can clone the template shown in the video below and follow along to get started.