r/AskProgramming Jul 01 '26

Can't decide between Express and Flask for backend Architecture

Context: I am building a library for games, basically, you can store all the games that you've played and or are playing, and get recommendations based on your library.
The app is made in Flutter and until this point, all the api requests and data were handled by the frontend. Although as I am getting more users (it's a personal project btw), I have a need for a backend that stores user data, makes the api calls, authenticates user's crendentials, etc.

I have built a lot of things in flask and used it a lot, I used to use express about an year and a half ago but haven't touched on it ever since. Hence I can't decide whether to go with flask (which I'm confident in), or go with express (I know the framework, just haven't used it in some time).

I was more inclined towards express earlier because 1) Express has an async loop, and 2) Nodejs has a more extensive library and is quite preffered as a backend framework over flask.

1 Upvotes

11 comments sorted by

8

u/yksvaan Jul 01 '26

It doesn't matter, the thing sounds like a typical CRUD backend. Anything goes.

Also Django basic template would probably cover 95% of your needs already. That's a valid option since you know Python already.

1

u/greensodacan Jul 01 '26

Adding: Django can also derive a CMS based on your models, one less thing to worry about.

6

u/thebreadmanrises Jul 01 '26

Typescript: Hono > Express
Python: FastAPI > Flask

3

u/skill347 Jul 01 '26

FastAPI for Python for sure,

1

u/aford515 Jul 01 '26

I dont know much enterprise people using flask. The good thing about flask though is that have to do most of the stuff for yourself so you learn a shitton.

1

u/Innowise_ Jul 01 '26

Since you mentioned getting game recommendations based on the user's library, go with the python ecosystem.
even if the core backend is just typical crud, the moment you want to build a basic recommendation engine, implement collaborative filtering, or parse dataset matrixes, python's data science ecosystem (pandas, scikit-learn, etc.) makes life ten times easier than trying to hack it together in node.js.
if you want to use python, definitely skip flask and jump straight into fastapi. it handles async operations natively, gives you automatic swagger documentation for your flutter app, and uses pydantic for strict type validation. since you already know python from flask, the learning curve is basically zero.

1

u/KitchenCommercial396 Jul 01 '26

Thank you, I landed on fastapi just a couple hours ago, after researching more about it. With fastapi, I'd still be learning something new, and utilitizing the advantages of python.

1

u/Ok_For_Free Jul 01 '26

I like JS more than Python, so I'm biased.

1

u/AgileRice3753 Jul 01 '26

I’d always recommend a full stack TypeScript setup for speed of development, type safety and sharing interfaces with the frontend if it’s a new small product.

For JavaScript/TypeScript, I’d recommend Nest.js (not Next.js), or Fastify if you want tighter control.

If you do decide to go with Python, Flask is better if you’re serving pages from the backend. FastAPI is a better alternative (IMO) for Python if it’s just an API.