None
SQ
FastAPI vs Flask performance comparison
['Ashish Bhatia']
ashishb.net
# Size: docker image inspect python-flask --format='{{.Size}}' | numfmt --to=iec-i # Run: docker run -it --rm --cpus=1 --memory=100m -p 8001:8001 python-flask FROM python:3.13-slim AS base WORKDIR /app RUN pip3 install --no-cache-dir flask gunicorn SHELL [ "/bin/bash" , "-c" ] RUN echo -e "\ from flask import Flask # Size: docker image inspect python-fastapi --format='{{.Size}}' | numfmt --to=iec-i # Run: docker run -it --rm --cpus=1 --memory=100m -p 8002:8002 python-fastapi FROM python:3.13-slim AS base WORKDIR /app RUN pip3 install --no-cache-dir fastapi gunicorn uvicorn SHELL [ "/bin/bash" , "-c" ] RUN echo -e "\ from fastapi import FastAPI Bash 1 2 3 4 5 6 7 8 9 10 11 12 13 $ h2load --h1 -n1000 -c40 'http://localhost:8001' # Flask ...