FastAPI [ Python Web Framework ] Crash Course 2021 For Beginners

In this crash course, you will know the basics of FastAPI, this awesome Python web framework for building web apps and APIs.
You will understand what is an ASGI server , what is Uvicorn and Starlette and a whole bunch of other stuff.
We will also write a CRUD Router for a Todo application on the backend with the help of interactive documents using OpenAPI.
I think you will learn a lot in this course, and if you have any questions, don't hesitate to fire them up.
Index 📝
--------------
00:00​ Presentation
01:02​ What's FastAPI?
03:24 FastAPI features
04:06 ASGI | UVICORN | NODEJS | GO
05:29 FastAPI | UVICORN | STARLETTE
06:45 FastAPI Creator "Sebastien Ramirez"
09:04 Setup and Structure of CRUD Todo App
10:55 Minimal App
19:12 GET Request [ Read Todo ]
23:36 POST Request [ Create Todo ]
27:05 PUT Request [ Update Todo ]
33:03 DELETE Request [ Delete Todo ]
Sources 🌐
--------------
Source Code + presentation : github.com/BekBrace/FastAPI_C...
FastAPI Site : fastapi.tiangolo.com/tutorial...
FastAPI Github page : github.com/tiangolo/fastapi
tiangolo Github page : github.com/tiangolo
Git bash link to download : git-scm.com/downloads
FastAPI video link : • FASTAPI [ Python Frame...
Social Media 🔗
--------------
Facebook : / bekbrace​
DEV profile : dev.to/bekbrace​
Github page : github.com/BekBrace​

Пікірлер: 160

  • @aitools24
    @aitools249 ай бұрын

    00:00 FastAPI is a modern and fast web framework for building APIs with easy-to-use features. 04:15 FastAPI uses ASCII server and Uvicorn implementation for building high performance sync IO services. 08:52 FastAPI is a growing Python web framework 13:48 Creating a router decorator in FastAPI 18:15 Creating a minimal app with FastAPI 23:50 Creating a to-do list API with GET, POST, and PUT requests 28:49 Creating a delete route for to-do items 34:33 FastAPI CRUD operations demonstrated Crafted by Merlin AI.

  • @BekBrace

    @BekBrace

    9 ай бұрын

    Thank you so much 😊👍🙏

  • @soulphish48
    @soulphish483 жыл бұрын

    I've been following a tutorial using FastAPI that creates a web app. I thought I was following along well, but your video has actually opened my eyes more and I understand so much more of why I doing what I'm doing, imstefa of just blindly following! Thank you.

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    Thanks Aaron 🙏, this means a lot to me - Glad you found it useful 🙂

  • @ItumelengS

    @ItumelengS

    2 жыл бұрын

    same here, i have a clue of how it works now.

  • @BekBrace

    @BekBrace

    19 күн бұрын

    I'm so glad that was useful

  • @marcus7387
    @marcus73873 жыл бұрын

    Thank you so much sir, I didn’t find any FastAPI course on KZread - thanks a lot

  • @eljesco8945
    @eljesco89453 жыл бұрын

    Pycharm all day. This Fastapi crash course is by far the easiest and clearest intro explanation I've followed up to now. Thank you!

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    PyCharm is great ! Thanks a lot El Jesco, I’m glad you found this course useful 🙂

  • @Babs42

    @Babs42

    Жыл бұрын

    Vim forever ;).

  • @glennmilsap7467
    @glennmilsap74673 жыл бұрын

    Awesome tutorial! Easy to follow , to the point, simple examples and yet thorough. Thank you.

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    Thank you, Glenn 🙏

  • @narutokun5093
    @narutokun50933 жыл бұрын

    the best FastAPI course on KZread hands down !!! bless you man !

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    Thank you Naruto

  • @juanmanero4631
    @juanmanero46313 жыл бұрын

    Seriously man, this is one of the best fastapi crash courses on youtube and I am surprised your channel doesn't get a descent amount views and subscribers while other undeserved do !!! Thanks Bek and keep it going man

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    Thank you 🙏

  • @julesrif
    @julesrif3 жыл бұрын

    VSC over here, excellent crash course, thanks a lot!

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    Thank you, Julio - appreciate it 🙏

  • @techworld3043
    @techworld30433 жыл бұрын

    Very high quality video .. Thanks for making this. Now i will watch all of your videos...

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    Thank you Tech world 🙏🙂

  • @fleboho
    @fleboho2 жыл бұрын

    This was straight to the point, a very neat introduction. Full crud. Loved it.

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    Thank you Farsi, I’m glad you liked it 🙂

  • @avinashpatel6745
    @avinashpatel67453 жыл бұрын

    Sir, not only you teach well but your video editing and thumbnail designing skills are GREAT ! I use VS Code.

  • @moshawa588
    @moshawa5882 жыл бұрын

    Always nice to find a hidden gem channel, great content

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    Thank you 😊 so much !

  • @4things4you
    @4things4you2 жыл бұрын

    Thanks Sir ...getting clear in all endpoints

  • @jimmyopot1972
    @jimmyopot19723 жыл бұрын

    Really nice intro for Django developers

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    Thank you, Jimmy

  • @xBaphometHx

    @xBaphometHx

    2 жыл бұрын

    I see what you did there.

  • @melund
    @melund Жыл бұрын

    Glad I came over this course. GREAT! I'm using Pycharm!

  • @BekBrace

    @BekBrace

    Жыл бұрын

    thank you my friend

  • @DeLaCruzer11
    @DeLaCruzer11 Жыл бұрын

    Good tutorial. I want to thank you also for taking the effort of increasing the font size of the codes so that we can all read the code easily. Other tutorial videos won't even bother to do that. It's hard to read the code that one just gives up!. You won't get anything out of it if you can't even see the code and it just add another layer of difficulty in the learning process. Again great job for your tutorial videos!

  • @BekBrace

    @BekBrace

    Жыл бұрын

    Thank you very much 🙏 Glad you liked the tutorial 🙂

  • @thetechtimes
    @thetechtimes2 жыл бұрын

    Awesome tutorial dude!!

  • @mirakarous5896
    @mirakarous58963 жыл бұрын

    VSCode is my fav, but I also use sublime text sometimes

  • @chrisogonas
    @chrisogonas Жыл бұрын

    Good stuff! I love FastAPI.

  • @fbravoc9748
    @fbravoc97488 ай бұрын

    Amazing crash course!!! Thanks!!

  • @BekBrace

    @BekBrace

    8 ай бұрын

    Thank you very much 🙏😊

  • @user-or7ji5hv8y
    @user-or7ji5hv8y3 жыл бұрын

    Yes, what is concurrency. Thanks

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    I’ll answer your question in a future separate video

  • @davidcostigan8816
    @davidcostigan88163 жыл бұрын

    PyCharm and Atom - switched to VS Code lately and it's a smart IDE

  • @asha6175

    @asha6175

    3 жыл бұрын

    I hate pycharm

  • @onestopdatascience7810
    @onestopdatascience7810 Жыл бұрын

    Loved this video clear and consize explanation. Keep up the good work. Thanks 👍

  • @BekBrace

    @BekBrace

    Жыл бұрын

    Thank you

  • @ItumelengS
    @ItumelengS2 жыл бұрын

    What a nice introduction to FastAPI

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    Thank you Eddy 🙏

  • @Çalhanoğluuuu
    @Çalhanoğluuuu3 жыл бұрын

    Vscode and sublime text.. Thanks for this video.. Excellent explanation 👍

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    Thank you, Ajmal 🙏

  • @strange_man
    @strange_man3 жыл бұрын

    I am happy to come across with this video :) have been planning to start till today :) thank you. I would like to see more of FastAPI tutorials from you.

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    Thank you Ulvi, and you are very welcome, friend

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    Actually, there are a few FastAPI videos on the channel, and currently I'm preparing a FastAPI-VueJS Full-stack tutorial, probably will be uploaded by the end of the current month - stay tuned

  • @strange_man

    @strange_man

    3 жыл бұрын

    @@BekBrace FastAPİ + Vue 🥰 what i am looking for. I am looking forward seing your content

  • @ronaldronald8819
    @ronaldronald88193 жыл бұрын

    That was a real jump start tutorial. Thanks! btw i use vs-code. If you like to do a course on the whole stack react and mongodb that would be so excellent.

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    Thanks a lot Ronald 🙂 Actually I am currently preparing a full tutorial on the FARM stack ( FastAPI - React - MongoDB) 👍

  • @mohammadpakravan9516
    @mohammadpakravan95162 жыл бұрын

    This video was amazing tnx body and keep it up

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    Glad you liked it, Vampire 🧛‍♀️🙂

  • @arunima2916
    @arunima29162 жыл бұрын

    Very useful, thank you so much!!

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    Thank you my friend 🙏

  • @johnc5258
    @johnc5258 Жыл бұрын

    im blown away. starting to hate myself for loving things getting easier and easier. im such a lazy programmer lololo

  • @BekBrace

    @BekBrace

    Жыл бұрын

    We're all lazy programmers 😂

  • @johnc5258

    @johnc5258

    Жыл бұрын

    @@BekBrace that was an awesome intro to FastAPI. i'm even interested in a FARM stack (coming from basic bootstrap and postgre)

  • @zameerahmed1775
    @zameerahmed1775 Жыл бұрын

    Fantastic video ............... Keep up the good work. God bless

  • @BekBrace

    @BekBrace

    Жыл бұрын

    Thank you very much my friend

  • @KeyserTheRedBeard
    @KeyserTheRedBeard2 жыл бұрын

    exceptional content Bek Brace. I shattered that thumbs up on your video. Keep up the awesome work.

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    Thanks a lot Keyser The Red Beard 🙂🙏

  • @jokertdm1688
    @jokertdm16882 жыл бұрын

    Great bro :)

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    شكرا اخى الكريم

  • @123arskas
    @123arskas Жыл бұрын

    Loved it. I was hoping you'd give us FARM and I saw you already have done that. Amazing work

  • @BekBrace

    @BekBrace

    Жыл бұрын

    I am humbly accepting the fact that I was the first on KZread to create a FARM stack course, and it's even on FreeCodeCamp :) Thank You for watching

  • @123arskas

    @123arskas

    Жыл бұрын

    @@BekBrace I believe you coined the term too.

  • @yourdadsbestfriend7101
    @yourdadsbestfriend71013 жыл бұрын

    spectacular!

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    Thank you so much 🙏

  • @jclm1rt
    @jclm1rt2 жыл бұрын

    Nice video!!

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    Thank You, Julio!

  • @spoonikle
    @spoonikle6 ай бұрын

    the docs page is a really great dev aid

  • @new.one1886
    @new.one18862 жыл бұрын

    انت مبدع استمر

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    شكرا صديقي 👍

  • @laTanabi
    @laTanabi2 жыл бұрын

    Very helpful tutorial. Thank you!

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    That’s great!! Thank you, friend

  • @laTanabi

    @laTanabi

    2 жыл бұрын

    @@BekBrace Nagrywaj więcej materiałów :)

  • @brainscott
    @brainscott3 жыл бұрын

    WSL 2 is a good Terminal with Ubuntu so you have all the right tools

  • @sasanvahidinia3929
    @sasanvahidinia3929 Жыл бұрын

    Great tutorial! Is there any bigger FastAPI (like an advanced one or something) on the way? that'd be awesome!

  • @BekBrace

    @BekBrace

    Жыл бұрын

    Thank you. A standalone no, but I'm preparing a big project taking vue js , fastapi, docker and authentication all in one application.

  • @duckyfoxy2939
    @duckyfoxy29392 жыл бұрын

    Thanks for sharing the video with the world, it seems to be easy to get started with, and the documentation feature is really such a powerful tool. However, if others are confused, at around 38:00 minute mark, you say that the JSON data you put, needs to have an entry with "id" present. This is not correct, as you are already using the URL path to define which ID you are interacting with. Hence, all the body needs to be, is a JSON object with "Activity" - nothing more. I felt you emphasized it a bit too much - hence I got a little confused. Another thing that could be interesting, would be to mention how you can make the API respond with proper status codes, for example when the ID was not found during RUD actions. Other than that, flawless, simple approach to a simple API. Thanks a bunch!

  • @badrinarayanans355
    @badrinarayanans355 Жыл бұрын

    Good crash course to learn fastapi, and I'll prefer visual studio code the most!

  • @BekBrace

    @BekBrace

    Жыл бұрын

    Thanks 👍

  • @martincronje5242
    @martincronje52429 ай бұрын

    I did this course really fast.

  • @BekBrace

    @BekBrace

    9 ай бұрын

    Great to hear, thank you for watching 🙂

  • @jeanleloup2205
    @jeanleloup22053 жыл бұрын

    I use visual studio code very often

  • @rangabharath4253
    @rangabharath42532 жыл бұрын

    awesome

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    Thank you 🙏

  • @yukinorhiko7388
    @yukinorhiko73883 жыл бұрын

    Always vscode, very comfortable

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    I feel the same with vscode

  • @JOHNDOE-ky9wz
    @JOHNDOE-ky9wz3 жыл бұрын

    Thanks man for this course , i learned a lot , and also i always work with visual studio code

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    Cool 👍

  • @riscaverse
    @riscaverse3 жыл бұрын

    Thank you for the excellent video. I use VSCode. I would like to see this code using React and deployed to a cloud host such as Google or Linode.

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    Thank you 🙏 Riscaverse for your support - I’m preparing currently a tutorial for the FARM stack ( FastAPI - React - MongoDB )

  • @lauranalo2254
    @lauranalo22543 жыл бұрын

    Goroutines(Go) Vs Coroutines (fastapi)

  • @newtonbuyi2095
    @newtonbuyi209511 ай бұрын

    Great tutorial, very concise explanations. Could you please advise on what we need to change in the model.py due to updated Pydantic ver 2.0 kicking errors. Thank you.

  • @BekBrace

    @BekBrace

    10 ай бұрын

    Thank you so much, I haven't actually checked out latest updates on Pydantic, as soon as I know, I will get back to you with a reply :)

  • @pawelsb
    @pawelsb2 жыл бұрын

    Great tutorial 💯 BTW which font you're using?

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    Thank you Pawel 🙂 theme is called Material

  • @pawelsb

    @pawelsb

    2 жыл бұрын

    @@BekBrace Do checkout "Jellyfish Theme" you'll love it. BTW I was asking about the font you're using in vscode it's looking cool.

  • @shobhitkumar9664
    @shobhitkumar96642 жыл бұрын

    What will be the changes in the code if body contains more than 1 property, right now we have one "Activity". Thanks.

  • @gerardmunoz6075
    @gerardmunoz60753 жыл бұрын

    what is async/await ?

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    Take a look to my series of simplified concepts in python, I talked about the asyncio library :)

  • @Jochimin
    @Jochimin3 жыл бұрын

    NeoVIM !!!

  • @johncrunk8038
    @johncrunk80383 жыл бұрын

    VSCode for the last two years. Also, never do anything in Python without pipenv.

  • @asha6175
    @asha61753 жыл бұрын

    I work in visual studio code all the time

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    Nice 👍

  • @confidential303

    @confidential303

    2 жыл бұрын

    I am sorry to hear that :S

  • @hamzaalarfaj6746
    @hamzaalarfaj67463 ай бұрын

    ❤❤❤

  • @BekBrace

    @BekBrace

    3 ай бұрын

    🤗

  • @luizferez89
    @luizferez893 жыл бұрын

    I like atom but it doesn’t work ok anymore. now I use visual studio code

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    Used to work with atom too for a while

  • @djedankharkryonia4223
    @djedankharkryonia42233 жыл бұрын

    I like VIM

  • @yourdadsbestfriend7101
    @yourdadsbestfriend71013 жыл бұрын

    why did we install starlette? i dont recall using it?

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    We installed Starlette [ which is a web framework that uses Uvicorn ASGI server ] because FASTAPI uses Starlette - so Starlette is the heart of speed & performance in FASTAPI, also Starlette helps you to build web apps with routing to different pages

  • @yarmik3d

    @yarmik3d

    3 жыл бұрын

    @@BekBrace You don't need to install Starlette separately, it is installed together with FastAPI.

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    @@yarmik3d Yes, it's true - Thank you Yaroslav

  • @SilverLake.
    @SilverLake. Жыл бұрын

    I have created localhost from Docker image. Can FastAPI be used with docker image localhost environment?

  • @BekBrace

    @BekBrace

    Жыл бұрын

    Yes

  • @jaimedpcaus1
    @jaimedpcaus12 жыл бұрын

    Could you create one video that returns a dB model? Thanks

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    Have you checked my FARM stack course ?

  • @jaimedpcaus1

    @jaimedpcaus1

    2 жыл бұрын

    @@BekBrace OH no, have not but will try to review. 🙂

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    @@jaimedpcaus1 this is a course showing how fastapi - mongodb - react can work together / you'll find it in fullstack playlist 🙏🙂

  • @jaimedpcaus1

    @jaimedpcaus1

    2 жыл бұрын

    @@BekBrace 🙂 OH ths. I will go and find it. Thank you and have a great day.

  • @haobamjameskumar3962
    @haobamjameskumar39622 жыл бұрын

    could somebody tell me what's Fastapi is used for and how it is different from Django and which one is better for web app ?

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    well, let me try to put it simply Fast API is a high-performance framework for building web apps with Python 3.6+ based on standard Python type hints. It is designed to be high performance and easy to learn, also FASTAPI enables you to use a REST interface to call functions to implement applications. Django is the most popular Python web framework, right ? It's a great framework that encourages rapid development (great for big projects because it has a lot of out-of-the-box tools and features). It follows a "batteries included" philosophy and ships with many tools that are needed by application developers such as ORM framework, admin panel , directory structure and more, you can check out my django projects for that.

  • @bjorncalbes7604
    @bjorncalbes76042 жыл бұрын

    can you create a whole ecommerce site and web apps with fast and react?

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    Yes definitely I can. Would you be interested in such tutorial ?

  • @bjorncalbes7604

    @bjorncalbes7604

    2 жыл бұрын

    @@BekBrace im watching yout farm stack video now, would love a more in-depth farm stack course ill pay for one and im sure others will also. there is no farm stack course out there yet

  • @maulanasodiqin4360
    @maulanasodiqin43603 жыл бұрын

    i use vim

  • @olivechevalier2896
    @olivechevalier28963 жыл бұрын

    VIM

  • @natedrake3256

    @natedrake3256

    3 жыл бұрын

    Is VIM difficult ?

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    VI is a code editor, but what do you use as IDE ?

  • @tormentacristal
    @tormentacristal Жыл бұрын

    I am using vscode

  • @mayankjadhav4509
    @mayankjadhav45093 жыл бұрын

    Why you are mentioning -> dict after a function? By default the function will return dictionary only. Could you please explain.

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    Not for any reason but clarity, also you can think of it as a constraint enforcement from my side; the same thing for async/await code; the program will run fine without it - just to show different patterns and get used to typing such code / Thanks Mayank for your observation

  • @mayankjadhav4509

    @mayankjadhav4509

    3 жыл бұрын

    @@BekBrace Thank you for the clarification 🙌🏻

  • @annabominakiran5934
    @annabominakiran59343 жыл бұрын

    Can you please show the same thing with a Database. Please do it with MongoDB. Or if you have already made a video or there any videos on the internet please share the link. Thank you :) (Vs Code btw). :)

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    Hello 👋 Annabomina my friend - I just released a new course for FARM stack using FastAPI MongoDB and React JS 🙂 check out my last video, you’ll find it

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    There it is : kzread.info/dash/bejne/oXur1dybc6ubipc.html

  • @annabominakiran5934

    @annabominakiran5934

    3 жыл бұрын

    I’m working on Angular..!!

  • @annabominakiran5934

    @annabominakiran5934

    3 жыл бұрын

    Do u have the same thing with Angular instead of react..??

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    @@annabominakiran5934 no

  • @vladimirrumyantsev7445
    @vladimirrumyantsev74453 жыл бұрын

    VS Code

  • @Lerklinten
    @Lerklinten3 жыл бұрын

    VSC

  • @Lerklinten

    @Lerklinten

    3 жыл бұрын

    Really good vids you are making- learning a lot

  • @BekBrace

    @BekBrace

    3 жыл бұрын

    Thank you, David, I’m glad to hear that

  • @jclm1rt
    @jclm1rt2 жыл бұрын

    vscode

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    The Best

  • @akinsholaakinniyi2717
    @akinsholaakinniyi271719 күн бұрын

    Who else is here from hng😂

  • @sidneydjango

    @sidneydjango

    19 күн бұрын

    It is well 😂😂

  • @BekBrace

    @BekBrace

    19 күн бұрын

    What is hng?

  • @sidneydjango

    @sidneydjango

    19 күн бұрын

    It's an internship program

  • @anounTT
    @anounTT2 жыл бұрын

    vscode

  • @BekBrace

    @BekBrace

    2 жыл бұрын

    Me too 😀