This decision was made on Sept 26, 2024 by @Yarik. I, Yarik am the Firmware Lead responsible for ground station development. This includes overseeing the development of the backend and the frontend for the ARO and MCC websites.
I made the decision to switch for the following reasons:
- no code for the backend has been written yet as of Sept 2024 so there is no time/resource costs switching
- both frameworks are Python micro web frameworks (one of the reasons Flask was chosen over Django)
- both are popular and used in industry and relatively easy to learn
- FastAPI supports request and response validation (Flask doesn’t) which helps with ease of development and debugging
- FastAPI is much faster and easily supports multiple users through asynchronous programming in comparison to Flask
- FastAPI has builtin api documentation generation which can be used for easily manually testing of endpoints and seeing the contract of the endpoint through swagger ui
- I have a lot more experience with FastAPI as a good portion of my coop was working on FastAPI backends in comparison to Flask, where I only built very small side projects. This will make it easier and fast for us to do development
Comparison of FastAPI, Flask and DJango popularity and history
Flask is more popular than FastAPI but not by much. FastAPI is quite new, only been around for 5-6 years but rapidly growing while Flask has been around for 15 yrs, so thats probably why you havent heard about it if you only worked on backend in 1st year. FastAPI is used at Microsoft and Netflix just to name a few. On WW, for postings I've looked at, they appeared the same number of times. In terms of GH stars, FastAPI has more stars than Flask. Comparing downloads from pip (not sure the time interval) I saw the following around Sept 28, 2024:
- Django (700k)
- FastAPI (2.8M)
- Flask (4.1M)