Django is very fast (it might be the slowest of the three, but it's relative), you can easily serve 1000's of connections per minute (and even do async if you want), so for most websites, it's way fast enough (we're not fortune 500 sites).
I use Flask, because it allows me to make temporary decisions based on short term requirements more easily. The usage of Blueprints for example makes it very modular and easy to change. I tried Django before, but was overwhelmed by too much magic behavior.
I started with Flask it made me understand the flow and basics and then I started Django that made me aware of some really cool reasons why Django is used in companies and its advantages and then I am doing internship so here I am working on fastapi which is pretty much similar to Express so now I know advantages of fastapi and why its called fast.
Django’s setup only takes 10minutes though if not less Create project Cd project Create app Connect app in settings Include your urls and a few little tweaks and than only can you start with the good staff with template, views and models Comes with SQLite aswell Perfect for beginners I think most beginners should start with Django just to know the structure of a real world web app/software Powerful I tell you I use Django for web apps and react native for mobile Most of my mobile apps are api based anyways so I just call/get my requests from my web apps server
@@pedrod.7576 for beginners if they have never set up or wrote a project profesionally, which they will be doing going forward anyway. Django teaches that at first which is a good thing.
Django is really easy to get started and actually major companies such as Google use it so that's actually completely false that it's only for small projects
We choose django not because it is django but because of its plugins. Django is the slowest among the three until you install the plugins with the most optimized algorithms on python on django then it beats them all. Take for example, Django-tree, django-filter, django-auth is the most complete auth out of the tree. Django rest framework is the most comprehensive REST framework that other frameworks from other languages try to copy from its features. Django is the most complicated out of the three but the most supported one by organization and companies. Bear with it.
I'm using Django without ORM and without templates and it is works quite well. Achieving more complex queries with ORM has to much performance penalties or is impossible, so I'm using it only for table User related things. Instead of templates I'm using Vue templates on the client side. Apache configuration was a little tricky, but after a few weeks of experimentation is started to work as expected. ASGI is possible with Django, but I've got impression it is not ready 100%. The main reason why I need ASGI is to run two query in parallel but AFAIK it is not possible with current Django.
I use flask in production at work. Performance is relative, you usually don't need it. Not saying don't take the fastest one. I did choose my Go framework on benchmarks But don't stop yourself to use flask, that plenty enough to do a lot of stuff.
I build all my apis and websites with fastapi. I have been paying attention to the robyn project as it has potential for a lot of performance since it is built over rust.
Flask for simple prototyping, Django for professional features, and FastAPI for high performance APIs Django is (i think) so fcking cool and its ORM is awesome ! Fast Api is cool tho
Which would you recommend for the best ORM? In terms of config simplicity and compatibility? I see a lot of fast API based projects with shiny new ORM extensions, but they seem to all be built off SQL alchemy. Best to just start with flask and vanilla sql alchemy?
Thanks Tim for your help but I will love for you to create a full basic structure documentation video about flask,fastapi and Django from the starting point to the end and even how to put it online and make updates when necessary please please do this for us 🙏
@@TechWithTim Hello sir Tim, can you please do a full comprehensive video on the general process of building a professional website, and how to organize your files and folders to s to come up with a professional website. thanks, will be looking forward to that.
Hey Tim, love your channel, but hoping to see more videos like the ones that originally drew me here. The recent sponsor-focused content has been a bit off-putting.
do you do requests? if you do, can you make a new django series. just do the basic as always and if possible compare some of your codes/lines on your last django series to the modern one.
I disagree with this video and what you're trying to say. You're making Flask look bad and claiming that it can not be used for complex projects, which is a total lie. Even Django should only be used for small projects because it’s not that flexible and doesn't work well with some modern technologies like NoSQL. More companies are starting to use Flask because it’s easy to modify. I respect the fact that you're a legend in Python programming, but I feel you need to rethink how you're using these technologies for bigger tasks. Flask is similar to Node.js, and anyone who has used it knows this. FastAPI is mainly just an API tool. Keep in mind that companies and startups rely on these solutions to make important decisions.
Note to add, flask and fastAPI are used as microservice and there are other frameworks used with it and a rabbitmq like message broker is used to interact wherever necessary and whole architecture is easy to deploy in kuberneties , django is often used for freelancing now or blogs, FYI any python project can't handle requests like other languages like go, Java, etc unless underlying server is changed like how bun is for nodejs which outperform both . There are some rust,zig servers underdevelopment for python. But still go, Java will still perform better . The scaling is not an issue with kuberneties so it's not big issue just you pour money on infrastructure more .
legal, mano... obrigado, digamos que eu queira construir uma empresa de táxi, tipo uber por exemplo, estou usando react nativo para meu celular, preciso de um dashboard, preciso usar comunicação em tempo real no backend do claro, para conectar meu painel e o aplicativo em uma comunicação em tempo real, qual devo usar?
Django is very fast (it might be the slowest of the three, but it's relative), you can easily serve 1000's of connections per minute (and even do async if you want), so for most websites, it's way fast enough (we're not fortune 500 sites).
Django async support in 2024 is awful.
@@jaimel8219 define "awful"?
Exactly. People talking speed like they are the next facebook or whatnot but in reality most of them have 100 active users at best
I use Flask, because it allows me to make temporary decisions based on short term requirements more easily. The usage of Blueprints for example makes it very modular and easy to change. I tried Django before, but was overwhelmed by too much magic behavior.
Honestly the behavior is magical. I'll hardly pick for an api project. For web apps, I can make do with the magic
I started with Flask it made me understand the flow and basics and then I started Django that made me aware of some really cool reasons why Django is used in companies and its advantages and then I am doing internship so here I am working on fastapi which is pretty much similar to Express so now I know advantages of fastapi and why its called fast.
Django’s setup only takes 10minutes though if not less
Create project
Cd project
Create app
Connect app in settings
Include your urls and a few little tweaks and than only can you start with the good staff with template, views and models
Comes with SQLite aswell
Perfect for beginners I think most beginners should start with Django just to know the structure of a real world web app/software
Powerful I tell you
I use Django for web apps and react native for mobile
Most of my mobile apps are api based anyways so I just call/get my requests from my web apps server
Bro are you using django full stack or as a backend only? Do you use it with react? Thank you in advance bro if you answer my dumb question🙏🏻
@@ArMor-dp7nbdjango can be use for backend only
honestly, just bite the bullet and go with Django.
Once you get the hang of django, it's the only framework you'll want to use.
true
Django for smaller projects works fine, in any case you want more features later once it grows
Totally 💯
Django is a nightmare to setup for beginners.
@@pedrod.7576 for beginners if they have never set up or wrote a project profesionally, which they will be doing going forward anyway. Django teaches that at first which is a good thing.
Django is really easy to get started and actually major companies such as Google use it so that's actually completely false that it's only for small projects
@@robopaul9 django is too good for small projects
Now I clearly understand what to use first and why. Thanks Tim.
which is first?
@@azariahazane4101 Django
Flask
nah i learned django and i prefer fastapi
We choose django not because it is django but because of its plugins. Django is the slowest among the three until you install the plugins with the most optimized algorithms on python on django then it beats them all. Take for example, Django-tree, django-filter, django-auth is the most complete auth out of the tree. Django rest framework is the most comprehensive REST framework that other frameworks from other languages try to copy from its features.
Django is the most complicated out of the three but the most supported one by organization and companies. Bear with it.
I'm using Django without ORM and without templates and it is works quite well. Achieving more complex queries with ORM has to much performance penalties or is impossible, so I'm using it only for table User related things. Instead of templates I'm using Vue templates on the client side.
Apache configuration was a little tricky, but after a few weeks of experimentation is started to work as expected.
ASGI is possible with Django, but I've got impression it is not ready 100%. The main reason why I need ASGI is to run two query in parallel but AFAIK it is not possible with current Django.
I use flask in production at work. Performance is relative, you usually don't need it.
Not saying don't take the fastest one. I did choose my Go framework on benchmarks
But don't stop yourself to use flask, that plenty enough to do a lot of stuff.
Quart > FastApi. And if hight performance is important then you shouldn't be using python anyways.
Recently at work, we conducted a performance comparison between Django and FastAPI, and interestingly, Django outperformed FastAPI in terms of speed.
I build all my apis and websites with fastapi. I have been paying attention to the robyn project as it has potential for a lot of performance since it is built over rust.
This comparison is wonderful , Thanks Tim !!
Awesome video. No nonsense, just dense information. Exactly what i was looking for.
Had debated that choice for a long time. Appreciate this breakdown.
thanks Tim, it was a good explaination
Hey Tim, what’s your view on Flask-async? How does that compare with fast-api?
django is amazing. 5 minutes to setup. 3 days to debug. So far liking fastAPI and HTMX.
DjangoRestFramework is awesome but I love the flexibility of FastAPI
For external frontent like nextjs etc. Fast api is recomended.
7:18 - the subtitle is synchronous insted of asynchronous programming
Flask for simple prototyping, Django for professional features, and FastAPI for high performance APIs
Django is (i think) so fcking cool and its ORM is awesome !
Fast Api is cool tho
Hi Tim, What cloud vendor is most sought after between AWS and Azure from your experience?
amazing video as always tim, thank you!
if you want rest api, def go with fastapi. If you want to serve HTML templates, go with flask or django. Easy
a video demonstrating the async side of fast api would be very helpful.
you could also simply google 'async fast api'
You make complex topics so easy to understand. 📚 Thank you for being an incredible educator!
I like the control I have over micro frameworks
Which would you recommend for the best ORM? In terms of config simplicity and compatibility? I see a lot of fast API based projects with shiny new ORM extensions, but they seem to all be built off SQL alchemy. Best to just start with flask and vanilla sql alchemy?
Thanks Tim for your help but I will love for you to create a full basic structure documentation video about flask,fastapi and Django from the starting point to the end and even how to put it online and make updates when necessary please please do this for us 🙏
I have many videos on all of themb
@@TechWithTim ok but please do you have videos on how to update your website
@@TechWithTim Hello sir Tim, can you please do a full comprehensive video on the general process of building a professional website, and how to organize your files and folders to s to come up with a professional website.
thanks, will be looking forward to that.
You did not discuss django rest framework
Tim you're top man mate!
what is the best backend if you're building a dynamic website using flet?
microservices with FastApi with docker kubernetes and fancy cloud solutions event sourcing boom
@Tech with Tim please give us a breakdown of Reflex
Node js is the god of backend
Do more web development with Django please?😢
I do on my channel
Imo prototyping in fastapi is the same as flask. You don't need to use all the typing and async features
So I think tto stay alive on the market as a developer, it's best to know at least two these three options or maybe all three of them . Any ideas ?!😮
Hi, Tim. Which one would you recommend for an ML engineer?
Typically for an ML engineer, you'd deploy a model via an API. For that, sticking to the more API focused framework (FastAPI) would be ideal.
@@codewithlenny Thank You.
please create a large web application using farm stack
What is farm stack
@@ajayg2752 fastapi react mongodb
@@ajayg2752FARM -> FastAPI, React, MongoDB
@@ajayg2752 fast api, react, mongodb is Farm stack
@@ajayg2752FastApi, React and Mongo. It's not a thing 😂
hey Tim do a fast api react stack blocgging system that uses crud
What about laravel?
I've only just started working with it but livewre looks quite good
But he’s talking about Python here. Not PHP.
Hey Tim, love your channel, but hoping to see more videos like the ones that originally drew me here. The recent sponsor-focused content has been a bit off-putting.
Thank you so much
Hi Tim ❤
One of your old subscriber 🎉
You did not refer django-ninja , that combines fastapi with django.
do you do requests? if you do, can you make a new django series. just do the basic as always and if possible compare some of your codes/lines on your last django series to the modern one.
I find not much reason using flask over fastapi.
And if i need performance, I use robyn
Django is what I use daily.
I use Falcon
I love Flask
I disagree with this video and what you're trying to say. You're making Flask look bad and claiming that it can not be used for complex projects, which is a total lie. Even Django should only be used for small projects because it’s not that flexible and doesn't work well with some modern technologies like NoSQL. More companies are starting to use Flask because it’s easy to modify. I respect the fact that you're a legend in Python programming, but I feel you need to rethink how you're using these technologies for bigger tasks. Flask is similar to Node.js, and anyone who has used it knows this. FastAPI is mainly just an API tool. Keep in mind that companies and startups rely on these solutions to make important decisions.
Agreed😊
This was just his opinion. By the way, how did you come to Django shouldn't be used for complex or big projects?😂
Agreed, but only Flask drawback is that it doesn't provide support for asgi server.
Note to add, flask and fastAPI are used as microservice and there are other frameworks used with it and a rabbitmq like message broker is used to interact wherever necessary and whole architecture is easy to deploy in kuberneties , django is often used for freelancing now or blogs, FYI any python project can't handle requests like other languages like go, Java, etc unless underlying server is changed like how bun is for nodejs which outperform both . There are some rust,zig servers underdevelopment for python. But still go, Java will still perform better . The scaling is not an issue with kuberneties so it's not big issue just you pour money on infrastructure more .
Tell a good aggrid like framework fir any Python webapp
What about streaming video or music? Is it alright to use django or flask or fast?
You shouldn't use Python
Python is wrong choice for that, try with Rust or Golang
What about Reflex Framework ?
@Tech wih Tim your carrercourse website have a bug user cannot log in please fix it thank you!
Can you talk about Streamlit??
Are you in Bali?
Please make a video on nodejs vs springboot vs django?
Excelente resúmen
I love django
Exact video I got
legal, mano... obrigado, digamos que eu queira construir uma empresa de táxi, tipo uber por exemplo, estou usando react nativo para meu celular, preciso de um dashboard, preciso usar comunicação em tempo real no backend do claro, para conectar meu painel e o aplicativo em uma comunicação em tempo real, qual devo usar?
Lightstar
Litestar and robyn are great frameworks too.
I don't have much time
I feel sad that I couldn't watch all videos 😢
What about Django-Ninja ?
Bro just casually flexing with the background 😭
No no no no no no no. Emacs only!
the real deal is litestar
How to track crypto whales using the Etherscan API
Flask has async since v2.0
FASTAPI
That's not true. FastAPI is easier to learn than flask. And their performance is even better.
I use all 3
What a bunch of cliches.
He basically told us that Flask is for hobby projects only.
Litestar
Hono is new
streamlit crying in corner
😂😂
Golang
Sanic
CherryPy 💀
Hi sir h r u .? Long time no see u?sir plz python with mangodb in real a ecommernce website full for a to z all things plz describe
Just use Java Spring🍝
Boss !
You don't have any content...
Repeating same old points again and again and wasting our precious time.
none of the above lol
You guy's need to tell each other when you are making a video. Both you guy's are always walking around in the background.
Just enjoy the view
True what's the matter with people walking xD
@@denverjamesduran2750 I was messing with him calm down.
Disliked bc jetbrains
I am learning django 🎉 it is best for ai development also
Why?
@@oxyht in a real time ai application we use tons of data to manage those mount of datas
We need powerful framework like django
@@destroyer9154you can integrate ai with js also😂 no need to waste time on python