Overview of FastAPI

Explore the fundamental concepts of FastAPI.

FastAPI is a Python web framework for building RESTful APIs. It strictly adheres to the OpenAPI specification for API creation.

At its core, it provides the following features:

  • Automatic documentation with JSON schema.
  • Data validation using Python-style type annotations.
  • In-process background tasks.
  • Startup and shutdown events for the initialization and termination of processes.
  • Support for WebSockets.
  • Support for dependency injections.
  • Support for HTTP Basic, OAuth2, JSON Web Token (JWT), and more.

Automatic documentation

There are two types of documentation available in FastAPI:

  1. SwaggerUI: A single-page interactive documentation. We can test our API directly from the browser.

Get hands-on with 1200+ tech skills courses.