Options for building REST APIs in Python.
-
To build rest apis we have following options
- Flask
- Django – restful
- Fast API
-
We will be using FastAPI
How does python program run behind http(s)
-
A server listens to http and exposes the python files as a reaction to http calls

-
We have two flavors
- WSGI (Web server gateway interface)
- ASGI (Async server gateway interface)
-
Refer Here for fastapi docs
Lets create a hello-world fast api application
- Create a new directory
- initialize
uv init . - Add fastapi dependencies
uv add "fastapi[standard]"
- Refer Here for the example code
