FastAPI is a web framework for building HTTP-based service APIs in Python 3.8+. It uses Pydantic and type hints to validate, serialize and deserialize data. It uses ASGI (Asynchronous Server-Gateway Interface) protocol, which allows it to handle asynchronous requests efficiently. FastAPI also automatically generates OpenAPI documentation for APIs built with it.
FastAPI is built on top of the Starlette web server and includes features that make building web applications easier, such as automatic data validation, error handling, and interactive API docs.
Pydantic is the most widely used data validation library for Python. with Pydantic, schema validation and serialization are controlled by type annotations; less to learn, less code to write, and integration with your IDE and static analysis tools. Pydantic's core validation logic is written in Rust. As a result, Pydantic is among the fastest data validation libraries for Python.
ref:
https://github.com/fastapi/fastapi
https://youtu.be/rkPIftzu1pQ?si=VEeDliBEzIp64vp5
https://pypi.org/project/pydantic/
https://docs.pydantic.dev/latest/
FastAPI vs Flask - https://shakuro.com/blog/fastapi-vs-flask