FastAPI vs. Django REST Framework: Which One Should You Choose?

  Рет қаралды 8,374

Eric Roby

Eric Roby

Күн бұрын

Пікірлер: 45
@hmaina0
@hmaina0 3 ай бұрын
Used fastapi for 8 months, it's really fast and works with almost any existing python package, but the django ORM and admin panel is a significant advantage that DRF has over fastapi. I believe that using one over the other boils down to whether you need the django ORM & admin and the django packages provided by the community, or you want to have control over every part of your API and a few ms in performance improvement is worth the switch and someone else is building the admin panel.
@coderush24
@coderush24 4 ай бұрын
Need a full fledged FastAPI project with authentication and ReactJS as frontend
@codingwithroby
@codingwithroby 4 ай бұрын
I have that on my channel split between two videos.
@SageManOfficial
@SageManOfficial 4 ай бұрын
He has a next.js video which uses fastapi as the backend and includes jwt, sqlalchemy, etc.
@farismecinovic1499
@farismecinovic1499 3 ай бұрын
Can we get some production grade fast api project?
@my_name_is_ahad
@my_name_is_ahad 4 ай бұрын
The problem is Django ORM is better, That's why Django is still better. You can optimize DRF for latency and speed.
@codingwithroby
@codingwithroby 4 ай бұрын
Ohhhh, idk about that one. SQLModel is pretty freaking awesome nowadays.
@AsifSaifuddinAuvipy
@AsifSaifuddinAuvipy 2 ай бұрын
​@@codingwithrobynot for every project
@eymenongel6770
@eymenongel6770 Ай бұрын
Can fastapi be used for api endpoints and django in operations such as orm and database (everyone is good at it) and Roby’s fastapi course on udemy is amazing⭐️
@ruksharalam173
@ruksharalam173 Ай бұрын
Can you please make a similar comparison video between Async Django Ninja and FastAPI?
@codingwithroby
@codingwithroby Ай бұрын
It is on the backlist of content for me to make 🙂
@AsifSaifuddinAuvipy
@AsifSaifuddinAuvipy 2 ай бұрын
You should have compare Async Django vs Async FastAPI. DRF is not async yet
@codingwithroby
@codingwithroby 2 ай бұрын
I'll look into it 😎
@onclick-xt3mu
@onclick-xt3mu 3 ай бұрын
I'm using django as fullstack and that's why I have to use Django REST for the mobile app it's not bad but I wish it would improve its performance
@codingwithroby
@codingwithroby 3 ай бұрын
For sure, if you are using DRF on a Django project then its great. If you are not and wanting to create a project from scratch I'd choose FastAPI every single time.
@codernerd7076
@codernerd7076 4 ай бұрын
Looking for a course with FastAPI and Next.js with all auth features 😢
@codingwithroby
@codingwithroby 4 ай бұрын
I have a 90 min tutorial here that shows you that.
@codernerd7076
@codernerd7076 4 ай бұрын
@@codingwithroby oh wow gonna check that out thanks!
@SageManOfficial
@SageManOfficial 4 ай бұрын
I was going to use django rfw or even django ninja but i decided to use fastapi in the end. Django is good but i already made my front end and it seemed complicated to get it working solely as a backend.
@codingwithroby
@codingwithroby 4 ай бұрын
As stand alone frameworks, FastAPI is better. If you want to use Django, then DRF is not a bad attachment.
@aibasics7206
@aibasics7206 3 ай бұрын
if we have large scale features ..I means we have various features to take care in a webapp ..In that case also can we consider FastApi?
@codingwithroby
@codingwithroby 3 ай бұрын
For sure!
@codingwithroby
@codingwithroby 4 ай бұрын
Any other comparisons you want to see?
@_Software_developer_
@_Software_developer_ 4 ай бұрын
Python vs java as backend
@moinuddin-x6u
@moinuddin-x6u 4 ай бұрын
sir plz launch proper fast API series with complex project
@suriya_gm
@suriya_gm 4 ай бұрын
FastAPI vs Django-ninja
@kenmachine
@kenmachine 18 күн бұрын
You are comparing an apple & a banana and asking which one is mostly an apple. ye obviously, it's the apple. django by default is sync & fastapi is async which means fastapi should be faster & by huge margins have a lower latency
@helloquico
@helloquico Ай бұрын
wow, that's one FULL head of hair "you" had there in that clip :o
@codingwithroby
@codingwithroby Ай бұрын
Did you just make a bald joke?
@hasibulalamprionto2010
@hasibulalamprionto2010 2 ай бұрын
How about fastapi vs django ninja!!
@codingwithroby
@codingwithroby 2 ай бұрын
haha so many variations. I'll take a look and do a comparison!
@dev-akeel
@dev-akeel 3 ай бұрын
I hope by Pydantic you mean `SQLMODEL` in the modern world.
@codingwithroby
@codingwithroby 3 ай бұрын
Pydantic is a data validation library. It has nothing to do with SQLModel (an ORM) outside the fact that SQLModel uses it for db data validation behind scenes
@dev-akeel
@dev-akeel 3 ай бұрын
@@codingwithroby And I am 89.75% sure that you don't use Pydantic for anything else other than DB validation.
@codingwithroby
@codingwithroby 3 ай бұрын
I am 100% sure your 89.75% is wrong 😉 - at a minimum there should be three areas of data validation. 1. At the client level (not pydantic). 2A. At the transfer/endpoint level. This is the DTO coming into the backend from a client. Validation of all pieces of info, making sure data is valid before transforming into a table entity or performing business logic. 2B. Path and query Params are valid. For example making sure an ID is always positive, or a string parameter has at least 5 characters, etc. (both points of 2 is why FastAPI comes with pydantic as well). You can also validate headers, etc. 3. Database validation which is what you suggested.
@BeyondTheFirstPage
@BeyondTheFirstPage 4 ай бұрын
compare with django-ninja
@codingwithroby
@codingwithroby 4 ай бұрын
Not a bad idea! I'll add it to the list.
@joshthe10xengineer
@joshthe10xengineer 4 ай бұрын
So... is django dying? What would be a good use case for it?
@codingwithroby
@codingwithroby 4 ай бұрын
Django is not dying, but FastAPI is a better tool than DRF. Django is a full framework that allows you to do everything in a single framework. FastAPI allows you to get going quicker but you may have to do a bit more.
@suriya_gm
@suriya_gm 4 ай бұрын
FastAPI vs Django-ninja pls
@codingwithroby
@codingwithroby 4 ай бұрын
I added to the list of future comparisons 🙂
@_Software_developer_
@_Software_developer_ 4 ай бұрын
Like for your effort and performances Figure ❤
@codingwithroby
@codingwithroby 4 ай бұрын
Aww, thank you friend!
@krishnaagarwal7934
@krishnaagarwal7934 4 ай бұрын
Our company is already using fastapi since 2021
@codingwithroby
@codingwithroby 4 ай бұрын
Heck yeah, you're company knows what is up.
Stop Wasting Hours - Every Python Dev NEEDS to Master Poetry
10:54
SQLModel: The Python Library You Didn’t Know You Needed
14:57
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Python Django REST API In 30 Minutes - Django Tutorial
30:42
PedroTech
Рет қаралды 44 М.
Why Product Analytics Matters: 5 Plays to Drive Growth and Revenue
16:13
Marketplace Growth by Accoil Analytics
Рет қаралды 20
Django REST Framework series - Setup and Models
22:14
BugBytes
Рет қаралды 9 М.
FastAPI, Flask or Django - Which Should You Use?
9:49
Tech With Tim
Рет қаралды 114 М.
Why You NEED To Learn FastAPI | Hands On Project
21:15
Travis Media
Рет қаралды 171 М.
Laravel, Django, Next.js ... which framework would I use for building a SaaS?
11:35
Maximilian Schwarzmüller
Рет қаралды 33 М.
The Dome Paradox: A Loophole in Newton's Laws
22:59
Up and Atom
Рет қаралды 739 М.
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН