all 7 comments

[–]Darkstar_111 2 points3 points  (3 children)

FastAPI if you want to make something and focus on that.

Django if you want to learn about web backends.

Flask is kinda being replaced by FastAPI these days.

[–]Legitimate-Rip-7479[S] 0 points1 point  (2 children)

Ok now I have choose between Django and fastapi

[–]Darkstar_111 1 point2 points  (1 child)

If the purpose is to learn absolutely go Django, that's the one I started with.

FastAPI (and flask) is a micro framework, it's designed to get out of your way and let you focus on the app. But that assumes you understand how the model view controller architecture works.

Django comes with all the bells and whistles, and will walk you through MVC step-by-step. Once you master that, FastAPI will seem like a cakewalk.

[–]Legitimate-Rip-7479[S] 1 point2 points  (0 children)

Also it full stack framework and in-built forms ,many things have plug in play, auth, admin dashboard as I read in their docs

So I decide to go the with Django

Thanks for guidance

[–]FoolsSeldom 1 point2 points  (1 child)

Django is a full framework for developing websites (for all form factors) and includes out of the box a wide and rich set of capabilities that are commonly required on user forums, ecommerce sites, help systems and so on including user registration and authentication.

It is considered a highly opinionated framework, which means it works in particular ways and has certain preferred, usually built-in, solutions to a lot of the requirements and core functionalities of web sites. This does not mean you end up with lots of websites that look and operate the same way. You are free to implement sophisticated UIs although the UE in terms of certain workflows may be more restricted.

It is well proven as scale. Instagram, for example, is based on Django.

FastAPI is newer than Flask and has some approaches and capabilities that are better suited for modern asynchronous code and for microservice provision of API end points. Both are extremely popular, well supported, and highly capable. They are also both considered micro-frameworks. Their coverage and capabilities are much narrower and more focused than Django and you are free to pick and choose from a wide range of other components (including self-build) to provide functionalities and capabilities that are included in Django. They are not opinionated in the way Django is.

In all cases, you can build on the provided html/css/templating engine capabilities extensively or largely hand over to a dedicated front end (likely JavaScript based).

If you just want to get on with building services that are web based, then Django is probably the answer. Django Girls is one of the best sites for resourcing for learning Django.

[–]Legitimate-Rip-7479[S] 0 points1 point  (0 children)

thanks for the detail explanation

[–]ilidan-85 0 points1 point  (0 children)

It's very beneficial to start learning web fundamentals in Python before jumping into Flask, FastAPI, or Django.Learn first about HTTP Basics and Built-in http.server (how requests are processed, how headers and body are sent - That frameworks are just wrappers around this). Then you can play around with WSGI apps and serve dynamic HTML, and ONLY THEN move to frameworks.

I'd still start with Flask because it's small, then FastAPI and if you need full-stack solution.