FastAPI vs Django - The Ultimate Showdown! (Detailed Comparison)

Поділитися
Вставка
  • Опубліковано 19 січ 2025

КОМЕНТАРІ • 53

  • @my_name_is_ahad
    @my_name_is_ahad 7 місяців тому +28

    Django just has a lot more built in. User authentication, an ORM (Best ORM than any other Framework even ROR, Laravel or others) the admin panel and a whole lot more. You have to do it in FastAPI manually! You can use FastAPI in Django, Yes Its possible. There have also FastAPI like feature in Django called Django ninja! Django calls itself the framework for people with deadlines and it is true. It works, has a ton of support and flexibility. The actual choice is usually fastAPI vs flask as they are more comparable.

    • @coff3andprograming
      @coff3andprograming 7 місяців тому +2

      If the requirements are well defined or you are a freelancer at the right time, Django is the best Python framework, but when the requirements are very changing, Django becomes a huge headache.

    • @my_name_is_ahad
      @my_name_is_ahad 7 місяців тому +3

      @@coff3andprograming "but when the requirements are very changing, Django becomes a huge headache." That's not true. Sounds like skill issue, Mate.

    • @codingwithroby
      @codingwithroby  7 місяців тому +1

      I did the video for those who may not know the difference between the two. I enjoy FastAPI more but everyone has their preferences!

    • @aashayamballi
      @aashayamballi 7 місяців тому

      yep the fastapi comparison should be with flask

    • @ifeanyinneji7704
      @ifeanyinneji7704 6 місяців тому

      ​@@my_name_is_ahadYep it's a skill issue. You can modify your Django project to fit any use case.

  • @francosbenitez
    @francosbenitez 7 місяців тому +11

    So clear! Very detailed comparison. I am trying to learn FastAPI in my free time while working with Django in my full-time job.

    • @codingwithroby
      @codingwithroby  7 місяців тому +2

      I know someone who made a really awesome course about FastAPI if you want to check it out 😉 (link in bio)

  • @azataiot
    @azataiot 6 місяців тому +5

    Do your speed test implemented the authentitcation, security, sessions frameworks in FastAPI ? Or you are comparing them as their default state? Because django includes all of above by default, while FastAPI has no security concerns for example built-in. When you remove the middlewares above from django and test them 'barely' you will find a different answer.

    • @codingwithroby
      @codingwithroby  27 днів тому

      Hey there, great question. This is out of the box performance testing, so their default state.

  • @skewty
    @skewty 7 місяців тому +3

    Loved Sanic, then FastAPI after struggling to change the way some lower level Django pieces. Then we struggled with FastAPI, moved to Litestar and have found their development team more responsive. Also, appreciate that Litestar has more features and doesn't couple Starlette and Pydantic. (Love Pydantic though)

    • @codingwithroby
      @codingwithroby  7 місяців тому +2

      Ahh interesting, thanks for sharing!

  • @codernerd7076
    @codernerd7076 7 місяців тому +6

    Looking for a fast API with Next.js tutorial

    • @codingwithroby
      @codingwithroby  7 місяців тому +1

      Any project ideas?

    • @codernerd7076
      @codernerd7076 7 місяців тому

      @codingwithroby Maybe a laundry pickup/delivery service, something down to earth that could be a real-world app, no AI, stuff or unnecessary 3rd party seevices 🤔

    • @princereyes5400
      @princereyes5400 7 місяців тому

      @@codingwithroby ecommerce since that is the booming market nowadays

    • @ogunniransiji2686
      @ogunniransiji2686 6 місяців тому +1

      @@codingwithroby I will strongly suggest a comprehensive admin dashboard system

  • @riyansh3396
    @riyansh3396 7 місяців тому +1

    What matters is how many companies specially in your country is using Django and Fastapi, at the we all want coding jobs

    • @codingwithroby
      @codingwithroby  7 місяців тому

      Fair, but I’m not sure if it’s 100% accurate. The more popular one could also be more saturated

  • @chakratejaboppana6716
    @chakratejaboppana6716 7 місяців тому

    Hi Roby, I'm currently in the middle of your FastAPI course on Udemy, and I'm loving it! The content is clear and incredibly well-structured. Thanks for such a great resource!

  • @centralcoding
    @centralcoding 5 місяців тому

    What dou you think using django and Fastapi in the same project?

    • @codingwithroby
      @codingwithroby  5 місяців тому +1

      I would probably be against it. If you want Django MVC use Rest Django along with it

  • @joeuuk
    @joeuuk 6 місяців тому +4

    why are you wearing your t-shirt inside out?

    • @codingwithroby
      @codingwithroby  6 місяців тому +3

      HAHA - I was waiting for someone to mention that.
      1. It is kind of funny.
      2. It had a logo I didn't want shown

  • @shedrachugochukwu6245
    @shedrachugochukwu6245 7 місяців тому +1

    Thanks a lot, Eric. pardon me I have been trying to deploy a fast API app on Cpanel, but it's not working. Can you please make a video of it?

    • @codingwithroby
      @codingwithroby  7 місяців тому +2

      I’ll add it to the backlog of videos I am currently making for UA-cam 🙂

    • @youssefchaabi5402
      @youssefchaabi5402 5 місяців тому +1

      I think you can't deploy fastapi in Cpanel ,you need a vps or cloud

  • @coff3andprograming
    @coff3andprograming 7 місяців тому +1

    A slightly better comparison would have been between django rest framework and FastAPI, personally I develop with both APIS and they are very good options when creating a project, if it is completely web and the application is very well thought out from start to finish I think that django rest framework has a great advantage because of the MVP pattern, its entire ecosystem and that by following the philosophy you do not repeat yourself, you already have to do quite a few things, now if the requirements are very changing or it is a product that has Viewing FastAPI data has the great advantage of being able to make modifications without breaking the code, in addition to being asynchronous and quite fast, I would not recommend using Flask for any project.

    • @codingwithroby
      @codingwithroby  7 місяців тому +1

      Maybe an upcoming video: FastAPI vs Flask vs Django Rest.. thoughts?

    • @purpexe
      @purpexe Місяць тому

      ​@@codingwithroby yes please

  • @efbYouTube
    @efbYouTube 7 місяців тому +1

    TY!! curious to hear what u think of reflex (form pynecone)

    • @codingwithroby
      @codingwithroby  7 місяців тому +1

      I have never actually used reflex - I'll take a look and see if it something I should make a video on 🙂

  • @ddkinput
    @ddkinput 2 місяці тому +1

    There is no competitor to Django as a Web framework , if you are using Fastapi to build a web app then you are wasting your/company's time.

    • @codingwithroby
      @codingwithroby  2 місяці тому

      Django is better when dealing with the entire app- - FastAPI is better if you are scaling a BE web services for a FE SPA app.

  • @phyokyi9140
    @phyokyi9140 2 місяці тому

    I personally like FastAPI than Django. Django has a lot thing going on. but feel like it has a lot of necessary things have to take care of. Unless your life was fully into django, it's not worth it. Plus it's based all around MVC concept. Even you got RestAPI, it's lost it's purpose. You may start wondering why I need to use Django if I need to achieve this and that.

    • @mbk0mbk
      @mbk0mbk Місяць тому

      It depends on project and client demand, like if project going to end up needing admin, middleware, orm, then ig django is better, if client requirement changes cauze lot of code changes and more features or have limitations of django like nosql, socketio communication it's better to use fastapi, imo fastapi is being adopted well cuz of well documentation to support runtime type checks and proper explanation of async which flask launched late and fastapi being the buzz and having everything modern made flask live under shadows for now. Hope it gets into light one day but based on req/sec tests fastapi is really faster in python side for backend.

  • @inno4953
    @inno4953 6 місяців тому

    How can you compare Django with FastAPI and not FastAPI vs DRF?

    • @codingwithroby
      @codingwithroby  6 місяців тому +2

      I gave the people what they want haha - DRF vs FastAPI will be coming.

  • @muhammadtahir-f6n
    @muhammadtahir-f6n 7 місяців тому

    It's a really great, clear and concise comparison of fastapi and Django

    • @codingwithroby
      @codingwithroby  7 місяців тому +1

      Thank you so much, hopefully you were able to learn something!

    • @muhammadtahir-f6n
      @muhammadtahir-f6n 7 місяців тому +1

      Yes bro, I learned fastapi through your videos and created a full stack project for the final year college project..!
      I got help from your 51 minute fastapi and react tutorial

    • @muhammadtahir-f6n
      @muhammadtahir-f6n 7 місяців тому +1

      I watch your videos regularly to learn fastapi in depth..!

    • @codingwithroby
      @codingwithroby  7 місяців тому +1

      This makes me so freaking happy and pumped - let’s goooooo!

  • @mohammedajmal5009
    @mohammedajmal5009 7 місяців тому +1

    clean and understandable.👍

  • @Cpluspluscoderexpert
    @Cpluspluscoderexpert 5 місяців тому +1

    very helpfull video

  • @riyansh3396
    @riyansh3396 7 місяців тому

    Problem with fastapi is Migrations