FastAPI vs Flask: Which is BEST for you?

Поделиться
HTML-код
  • Опубликовано: 7 фев 2025
  • FastAPI and Flask battle it out to see which Python API framework is best!
    Want free repositories? www.codingwith...
    Want to learn FastAPI? Go here: www.udemy.com/...
    Join a community of Python Developers: / @codingwithroby
    Checkout all courses:
    www.codingwith...
    Checkout these videos:
    🎥 React + FastAPI: • How to build a React +...
    🎥 AWS Lambda + FastAPI: • Deploy FastAPI on AWS ...
    🎥 MongoDB + FastAPI: • Unlocking the Power of...
    🎥 MySQL + FastAPI: • How to build a FastAPI...
    🎥 PostgreSQL + FastAPI: • How to build a FastAPI...
    👨‍💻 Hi, I am Eric!👨‍💻
    Hey! I’m a seasoned python developer and cloud enthusiast. I love sharing my knowledge and helping others to discover the exciting world of programming and cloud technologies.
    🙏 Support The Channel 🙏
    If you found this tutorial helpful, please give it a thumbs up 👍, comment, and share it with your network 🌍
    #fastapi #flask #python

Комментарии • 50

  • @yokowasis
    @yokowasis 3 месяца назад +27

    TLDW : Fastapi beat flask on every benchmark. There I save you 7 minutes.

    • @codingwithroby
      @codingwithroby  3 месяца назад +2

      Every performance benchmark, not every category 😉

  • @vkmrishad
    @vkmrishad 3 месяца назад +3

    In reality all new projects are using FastAPI... instead even Flask is their default.
    FastAPI is also quite popular with new AI/ML/LLM application developers

  • @ashifDG
    @ashifDG 3 месяца назад +4

    Flask has async support with async-extra , and if you serve it with asgi (like hypercorn instead of gunicorn) it also shows full asynchronous behavior.
    can you give performance comparison with this configuration,

  • @codingwithroby
    @codingwithroby  3 месяца назад +1

    Which of the two frameworks do you prefer?

  • @muhammadadilnaeem
    @muhammadadilnaeem 3 месяца назад

    Now I can understand when to use flask and when to use fastapi. Thank you sir for this in-depth explanation.

  • @spotnuru83
    @spotnuru83 3 месяца назад

    Thank you for giving this kind of information, helps people to decide which way to take forward.

  • @kimlehtinen
    @kimlehtinen 3 месяца назад

    I have worked with my current client on a project for over 3 years, and at the time Flask felt more proven and mature, and a safer choice for a big enterprise. That's why we chose Flask back then. However, today I think we would go with FastAPI rather, much more modern and seem to have nice momentum ongoing. Might have to look into it, since we are about to create a new microservice.

    • @codingwithroby
      @codingwithroby  3 месяца назад

      I think it is really great - very similar attributes to Flask.

  • @polzan25
    @polzan25 3 месяца назад +1

    FastApi with Swagger ui has nice page for documentation of your api also. Do not know if flask has it but its a nice feature that was not mentioned

    • @codingwithroby
      @codingwithroby  3 месяца назад

      Flask does not come with this automatically, but it is lighter weight.

  • @hannanbhuiyan1430
    @hannanbhuiyan1430 2 месяца назад

    I love your RUclips channel. I am also a Python developer. Thanks for the video boss🥰

  • @hannanbhuiyan1430
    @hannanbhuiyan1430 2 месяца назад +1

    Could you please upload new project video with FastAPI and Nextjs on Udemy?

  • @AbuAl7sn1
    @AbuAl7sn1 Месяц назад

    can i see the code of these benchmarks ?

    • @codingwithroby
      @codingwithroby  Месяц назад

      I no longer have the code, but it was a straight forward Create & Read test for users by using locust.io/

  • @عبدالرحمناحمد-ك4ذ
    @عبدالرحمناحمد-ك4ذ 3 месяца назад +1

    Your videos are great

  • @curtezyt1984
    @curtezyt1984 3 месяца назад +1

    johnny sins if he was a developer XD btw good content

    • @codingwithroby
      @codingwithroby  3 месяца назад +3

      I had to look up who that was ... omg ... lol

  • @hasibulalamprionto2010
    @hasibulalamprionto2010 3 месяца назад

    Sir, please give a comparison on FastAPI and Django-Ninja

  • @timothyadebisi1064
    @timothyadebisi1064 3 месяца назад +1

    I prefer using FastAPI.

  • @harsimranjitsingh591
    @harsimranjitsingh591 3 месяца назад

    I love FastApi ❤

  • @CodewithAltech
    @CodewithAltech 3 месяца назад

    You know mine Eric 🎉🎉🎉

  • @mback12000
    @mback12000 28 дней назад

    What you're saying about fastapi being more difficult because of data validation and dependency injection makes no sense. Use of these are optional and so you need zero knowledge of them to get endpoints working.

    • @codingwithroby
      @codingwithroby  26 дней назад

      Fair enough - I was speaking from the point of FastAPI comes with more things. I could have reworded that differently.

  • @vkmrishad
    @vkmrishad 3 месяца назад

    FastAPI started in 2018, why your graph showing it starting from 2010

    • @codingwithroby
      @codingwithroby  3 месяца назад

      FastAPI was created in 2018. You can see the graph starts earlier because of Flask, but FastAPI sits at 0 until 2018.

  • @yellowdollar3558
    @yellowdollar3558 3 месяца назад

    Waiting video about architectures

  • @polzan25
    @polzan25 3 месяца назад +1

    And something else...i guess most of the viewer of your channel ( including myself) are kind of biased to fastapi...😊

  • @pietraderdetective8953
    @pietraderdetective8953 3 месяца назад +1

    Missed opportunity to talk about Quart: the native async version of Flask. A lot of Flask's most popular extensions works with Quart too!
    Migrating from Flask to Quart requires almost no code change, only need to add async await keywords.

    • @codingwithroby
      @codingwithroby  3 месяца назад

      Yeah, but technically Quart is different so I purposely left it out. Great addition to a comment here though.

  • @say.xy_
    @say.xy_ 3 месяца назад

    FastAPI Ftw

  • @DavidSmith-ef4eh
    @DavidSmith-ef4eh Месяц назад

    none. go.

    • @codingwithroby
      @codingwithroby  Месяц назад

      Nah, FastAPI, Flask and Django are awesome.

    • @DavidSmith-ef4eh
      @DavidSmith-ef4eh Месяц назад

      @@codingwithroby awesomely slow, yet lacking language features.