FastAPI migration
FastAPI seems to be a good framework for developing the API for multiple reasons:
- Autogenerate OpenAPI documentation
- Integrated request and response data validations
- Async programming support that will increase the performance of some endpoints
- Allows mounting our Flask app inside the main app to progressively migrate
It will be nice to see how good it is and evaluate that this transition is worth it
The proposed plan (for a first phase) should be:
-
Use FastAPI as the main app and mount the Flask app inside -
Adapt the middleware built for Flask -
Logging -
Error handling -
Authentication
-
-
Migrate v4 endpoints -
Migrate endpoints tests -
Define the Request and Response models
Phase 2:
-
Migrate v3 endpoints -
Migrate bg tasks -
Remove Flask