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...
| Published in: | Journal of Computer Sciences Institute |
|---|---|
| Main Authors: | , |
| 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 |
| _version_ | 1848766196903575552 |
|---|---|
| author | Bartłomiej Bednarz Marek Miłosz |
| author_facet | Bartłomiej Bednarz Marek Miłosz |
| author_sort | Bartłomiej Bednarz |
| collection | DOAJ |
| container_title | Journal of Computer Sciences Institute |
| description |
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.
|
| format | Article |
| id | doaj-art-e5aab7eec8fd471bbbbab331296940d4 |
| institution | Directory of Open Access Journals |
| issn | 2544-0764 |
| language | English |
| publishDate | 2025-09-01 |
| publisher | Lublin University of Technology |
| record_format | Article |
| spelling | doaj-art-e5aab7eec8fd471bbbbab331296940d42025-10-06T08:29:01ZengLublin University of TechnologyJournal of Computer Sciences Institute2544-07642025-09-013610.35784/jcsi.7738Benchmarking the performance of Python web frameworksBartłomiej Bednarz0https://orcid.org/0009-0006-1621-1701Marek Miłosz1https://orcid.org/0000-0002-5898-815XDepartment of Computer Science, Lublin University of Technology, Nadbystrzycka 36B, 20-618 LublinDepartment of Computer Science, Lublin University of Technology, Nadbystrzycka 36B, 20-618 Lublin 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. https://ph.pollub.pl/index.php/jcsi/article/view/7738benchmarkingperformanceFlaskDjango Rest FrameworkFastAPIsqlite |
| spellingShingle | Bartłomiej Bednarz Marek Miłosz Benchmarking the performance of Python web frameworks benchmarking performance Flask Django Rest Framework FastAPI sqlite |
| title | Benchmarking the performance of Python web frameworks |
| title_full | Benchmarking the performance of Python web frameworks |
| title_fullStr | Benchmarking the performance of Python web frameworks |
| title_full_unstemmed | Benchmarking the performance of Python web frameworks |
| title_short | Benchmarking the performance of Python web frameworks |
| title_sort | benchmarking the performance of python web frameworks |
| topic | benchmarking performance Flask Django Rest Framework FastAPI sqlite |
| url | https://ph.pollub.pl/index.php/jcsi/article/view/7738 |
| work_keys_str_mv | AT bartłomiejbednarz benchmarkingtheperformanceofpythonwebframeworks AT marekmiłosz benchmarkingtheperformanceofpythonwebframeworks |
