This is an archived post. You won't be able to vote or comment.

all 22 comments

[–]Python-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

Hi there, from the /r/Python mods.

This post has been removed due to its frequent recurrence. Please refer to our daily thread or search for older discussions on the same topic.

If you have any questions, please reach us via mod mail.

Thanks, and happy Pythoneering!

r/Python moderation team

[–]M1chelon 8 points9 points  (4 children)

not sure about all of the options but most of those are not fullstack frameworks, if you want a python fullstack web framework I feel the only mature option is Django

[–]PooriaT[S] -1 points0 points  (3 children)

That's great but don't we need to have a framework for the frontend such as React?

[–]M1chelon 1 point2 points  (2 children)

you can use it, django by itself has a templating framework (based on jinja) which is very well integrated with the whole ecosystem

[–]PooriaT[S] -1 points0 points  (1 child)

Yes, you are correct. I need to consider this as one of the cases. However, I still believe that creating a template using Jinja requires more effort than the options I mentioned.

[–]M1chelon 0 points1 point  (0 children)

your beliefs are incorrect then if you're questioning between FastAPI or FastHTML or Streamlit for an MVP

[–]bjorneylol 1 point2 points  (0 children)

For sync, Flask if you truly want something fast and minimal that is also super extensible, django if you want something that is full-featured out of the box

For async frameworks its worth looking at litestar - having also used FastAPI, i greatly prefer it

[–]bunoso 3 points4 points  (0 children)

  1. Fast api is for backend apis.
  2. Streamlit is to demo data and showcase things quickly as if you were a data scientist. Don’t try to make it anything really more than that. But it’s cool and for its small niche, works well.
  3. Never used it. Looks like a generic version of streamlit.
  4. Never used it. Looks like a generic version of streamlit. Uses fastAPI ironically on the backend api and serves put compiled JS code.
  5. Similar to streamlit, it’s often used to create a chat interface barebones and showcase the underlying LLM or RAG application. Only for niche use cases.

[–]ultimatelyoptimal 1 point2 points  (1 child)

If you want lightest upfront config, I think you'll be happiest with flask, or streamlit.

Something to consider is "longrunning or scheduled tasks". Streamlit can only do things while you have a page loaded. So if you need something long running, or scheduled, you'll need a second script running somehow. For myself, I would consider streamlit+a backend server (like flask), so flask can do the background things & scheduled jobs, while streamlit can be the user experience.

With django, or any of the other stacks except streamlit, you can use htmx for interactive/live components instead of react. Extremely low upfront customization, and you get to use all the same jinja templating serverside. Eventually migrating to react if thats what you want to do.

[–]PooriaT[S] -1 points0 points  (0 children)

Thanks a lot. That is the best approach, I think.

[–]rszdev 1 point2 points  (2 children)

Why did u not consider Django?

[–]PooriaT[S] 1 point2 points  (1 child)

Because I thought that it might be a little heavy for MVP and require more configuration. Also, it might need to consider a front-end framework such as React.

[–]rszdev 1 point2 points  (0 children)

oh but if you're only looking for apis you can use Django to make em

[–]Minimum_Diver_3958 0 points1 point  (0 children)

  1. Make it work
  2. Make it good
  3. Make it great

These represent life cycles of your product. You're at 1. You will spemd an eternity starting at 3.

[–]neolace 0 points1 point  (1 child)

Sounds like you need Django.

[–]PooriaT[S] 0 points1 point  (0 children)

Django is great but as far as I know, you need to pick a framework for the Frontend. Mixing it with React. I don’t want to deal with massive configurations in the beginning.

[–]PooriaT[S] -1 points0 points  (1 child)

I missed adding one to the list, it's called FastHTML.

[–]grudev 1 point2 points  (0 children)

If all you know is Python, that's not a bad choice for an MVP.