What is FastAPI?
The official FastAPI website describes FastAPI as a modern and high-performance web framework for building APIs with Python 3.6+ based on standard Python type hints. FastAPI is very fast due to its out-of-the-box support of the async
feature of Python 3.6+.
FastAPI was released in 2018, and it was created by Sebastián Ramírez. Ramírez was unhappy with existing frameworks like Flask and DRF, so he created his own framework using tools like Starlette and Pydantic. Now, many big tech companies like Uber, Netflix, and Microsoft are using FastAPI to build their apps.
FastAPI features
FastAPI has many great features. Let’s take a look at them:
High-performance: As the name suggests, FastAPI is fast. It’s considered to be one of the fastest Python frameworks currently available.
Robust: You can create production-ready code using automatic interactive documentation.
Intuitive: FastAPI was designed to be easy to use and learn. It offers great editor support and documentation.
Quick to code: FastAPI increases your developing speed by 200%-300%.
Fewer bugs: It reduces around 40% of induced bugs.
Compatible: It works well with the open standards for APIS, OpenAPI (previously known as Swagger), and JSON schema.
Plugins: You can easily create plugins using dependency injection.
Type hints: You can use type hinting for data validation and conversion.