replace Flask in-place with FastAPI and you get a bunch of QoL stuff for free w/ no drawbacks.
- wonderful integration with pydantic for serialization - background tasks - autogenerated swagger docs - dependency injection per-route
"in-place" is a stretch, you will have to change code, but I found it to be a very speedy task to migrate a codebase from flask to fastapi.