fastapi
- a minimalist and fast backend framework based on starlette and pydantic
- should be used to build highly performant apis for production use
creating an api
- install fastapi
pip install fastapi
- create a simple hello world api
from fastapi import FastAPI
app = FastAPI()
# GET request
@app.get("/")
def index():
return {"message": "Hello, World!!"}
- run the app on local
fastapi run dev
Links:
python fastapi vs django vs flask
202508202229