FastAPI is an open-source web framework for building APIs with Python. A web framework is a library that receives HTTP requests, calls the function written for each address, and sends back the result, here usually as JSON. FastAPI was created by the developer known as tiangolo, who maintains it with a small team. It uses Starlette for the web parts and Pydantic for the data parts.
The developer declares the parameters, request body and response of each endpoint once, with standard Python type hints such as item_id: int. From that declaration FastAPI validates incoming data and returns a clear error when it is invalid, converts JSON, path and query parameters, cookies, headers, forms and files into Python types and back, and generates an OpenAPI description with two interactive documentation pages, Swagger UI and ReDoc. It also supports async and await for concurrent requests, dependency injection, OAuth2 with JWT tokens, WebSockets and background tasks.
FastAPI is free under the MIT license. FastAPI Cloud, from the same author and team, hosts FastAPI apps, but the apps can run on any cloud provider.