Benchmarking the performance of Python web frameworks

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...

Full description

Bibliographic Details
Published in:Journal of Computer Sciences Institute
Main Authors: Bartłomiej Bednarz, Marek Miłosz
Format: Article
Language:English
Published: Lublin University of Technology 2025-09-01
Subjects:
Online Access:https://ph.pollub.pl/index.php/jcsi/article/view/7738
Description
Summary: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.
ISSN:2544-0764