Benchmarking the performance of Python web frameworks - Bednarz, Bartłomiej; Miłosz, Marek (Journal of Computer Sciences Institute, 2025)
This article presents a comparative performance analysis of three the most popular Python web frameworks - Django (with Django Rest Framework), Flask, and FastAPI - in the context of developing Web APIs. The evaluation focused on key performance metrics such as request throughput for basic GET and POST operations, and response times for database-related CRUD operations. FastAPI consistently outperforms the other frameworks in most scenarios. The study also highlights how ORM usage can incur performance costs, even outside database use. A notable outlier was found in FastAPI when using SQLModel for large-scale data retrieval. Overall, the findings provide practical insights that can assist developers in selecting the most suitable framework.