Sitemap
GlowMatrixAISolutions

Agent of change: Brightening futures with AI-powered solutions

Why FastAPI?

What is FastAPI?

2 min readAug 18, 2025

--

FastAPI is a framework to build the scaleable and robust API’s. Now you may think but why FastAPI ? we already have Flask and Django frameworks in python to build API’s.

FastAPI is built on top of two important python libraries — Starlatte and Pydantic.

Starlatte — This is used to handle all the HTTP request from client to server and server to client.
Pydantic — This is used to have data validations because python does no do type check by default.

Problems with Flask/Django

  1. There were performance issues, latency issues.
  2. There was lot of boilerplate code even for a simple app.

Solutions with FastAPI

  1. It is fast to run and fast to code.
  2. We can define the type and validate the request data.

How FastAPI is fast to run?

The flow for any api call look like, user sends request to backend it gets into webserver from there is uses api code to generate the response. We will have below components used for all req, resp generations.

Webserver — Use to handle HTTP request from client.

SGI — Server Gateway interface.

The app code does not understand the req directly, so we use a SGI to make backend python code understand the request information.

--

--

Lokesh
Lokesh

Written by Lokesh

Software Engineer. To know more about me check https://lokesh-online.web.app

GlowMatrixAISolutions
GlowMatrixAISolutions

Published in GlowMatrixAISolutions

Agent of change: Brightening futures with AI-powered solutions