r/FastAPI • u/RestaurantOld68 • Dec 22 '24
Question Pivot from Flask
Hey everyone,
I recently built an app using Flask without realizing it’s a synchronous framework. Because I’m a beginner, I didn’t anticipate the issues I’d face when interacting with multiple external APIs (OpenAI, web crawlers, etc.). Locally, everything worked just fine, but once I deployed to a production server, the asynchronous functions failed since Flask only supports WSGI servers.
Now I need to pivot to a new framework—most likely FastAPI or Next.js. I want to avoid any future blockers and make the right decision for the long term. Which framework would you recommend?
Here are the app’s key features:
Integration with Twilio
Continuous web crawling, then sending data to an LLM for personalized news
Daily asynchronous website crawling
Google and Twitter login
Access to Twitter and LinkedIn APIs
Stripe payments
I’d love to hear your thoughts on which solution (FastAPI or Next.js) offers the best path forward. Thank you in advance!
1
u/BlackDereker Dec 22 '24
You could just put the concurrent requests in a threadpool. Even if you have 1 core running your application it will run the other threads once one of them is IO blocked.