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
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
9 ай бұрын
Thank you so much 😊👍🙏
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
3 жыл бұрын
Thanks Aaron 🙏, this means a lot to me - Glad you found it useful 🙂
@ItumelengS
2 жыл бұрын
same here, i have a clue of how it works now.
@BekBrace
19 күн бұрын
I'm so glad that was useful
Thank you so much sir, I didn’t find any FastAPI course on KZread - thanks a lot
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
3 жыл бұрын
PyCharm is great ! Thanks a lot El Jesco, I’m glad you found this course useful 🙂
@Babs42
Жыл бұрын
Vim forever ;).
Awesome tutorial! Easy to follow , to the point, simple examples and yet thorough. Thank you.
@BekBrace
3 жыл бұрын
Thank you, Glenn 🙏
the best FastAPI course on KZread hands down !!! bless you man !
@BekBrace
3 жыл бұрын
Thank you Naruto
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
3 жыл бұрын
Thank you 🙏
VSC over here, excellent crash course, thanks a lot!
@BekBrace
3 жыл бұрын
Thank you, Julio - appreciate it 🙏
Very high quality video .. Thanks for making this. Now i will watch all of your videos...
@BekBrace
3 жыл бұрын
Thank you Tech world 🙏🙂
This was straight to the point, a very neat introduction. Full crud. Loved it.
@BekBrace
2 жыл бұрын
Thank you Farsi, I’m glad you liked it 🙂
Sir, not only you teach well but your video editing and thumbnail designing skills are GREAT ! I use VS Code.
Always nice to find a hidden gem channel, great content
@BekBrace
2 жыл бұрын
Thank you 😊 so much !
Thanks Sir ...getting clear in all endpoints
Really nice intro for Django developers
@BekBrace
3 жыл бұрын
Thank you, Jimmy
@xBaphometHx
2 жыл бұрын
I see what you did there.
Glad I came over this course. GREAT! I'm using Pycharm!
@BekBrace
Жыл бұрын
thank you my friend
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
Жыл бұрын
Thank you very much 🙏 Glad you liked the tutorial 🙂
Awesome tutorial dude!!
VSCode is my fav, but I also use sublime text sometimes
Good stuff! I love FastAPI.
Amazing crash course!!! Thanks!!
@BekBrace
8 ай бұрын
Thank you very much 🙏😊
Yes, what is concurrency. Thanks
@BekBrace
3 жыл бұрын
I’ll answer your question in a future separate video
PyCharm and Atom - switched to VS Code lately and it's a smart IDE
@asha6175
3 жыл бұрын
I hate pycharm
Loved this video clear and consize explanation. Keep up the good work. Thanks 👍
@BekBrace
Жыл бұрын
Thank you
What a nice introduction to FastAPI
@BekBrace
2 жыл бұрын
Thank you Eddy 🙏
Vscode and sublime text.. Thanks for this video.. Excellent explanation 👍
@BekBrace
3 жыл бұрын
Thank you, Ajmal 🙏
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
3 жыл бұрын
Thank you Ulvi, and you are very welcome, friend
@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
3 жыл бұрын
@@BekBrace FastAPİ + Vue 🥰 what i am looking for. I am looking forward seing your content
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
3 жыл бұрын
Thanks a lot Ronald 🙂 Actually I am currently preparing a full tutorial on the FARM stack ( FastAPI - React - MongoDB) 👍
This video was amazing tnx body and keep it up
@BekBrace
2 жыл бұрын
Glad you liked it, Vampire 🧛♀️🙂
Very useful, thank you so much!!
@BekBrace
2 жыл бұрын
Thank you my friend 🙏
im blown away. starting to hate myself for loving things getting easier and easier. im such a lazy programmer lololo
@BekBrace
Жыл бұрын
We're all lazy programmers 😂
@johnc5258
Жыл бұрын
@@BekBrace that was an awesome intro to FastAPI. i'm even interested in a FARM stack (coming from basic bootstrap and postgre)
Fantastic video ............... Keep up the good work. God bless
@BekBrace
Жыл бұрын
Thank you very much my friend
exceptional content Bek Brace. I shattered that thumbs up on your video. Keep up the awesome work.
@BekBrace
2 жыл бұрын
Thanks a lot Keyser The Red Beard 🙂🙏
Great bro :)
@BekBrace
2 жыл бұрын
شكرا اخى الكريم
Loved it. I was hoping you'd give us FARM and I saw you already have done that. Amazing work
@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
Жыл бұрын
@@BekBrace I believe you coined the term too.
spectacular!
@BekBrace
3 жыл бұрын
Thank you so much 🙏
Nice video!!
@BekBrace
2 жыл бұрын
Thank You, Julio!
the docs page is a really great dev aid
انت مبدع استمر
@BekBrace
2 жыл бұрын
شكرا صديقي 👍
Very helpful tutorial. Thank you!
@BekBrace
2 жыл бұрын
That’s great!! Thank you, friend
@laTanabi
2 жыл бұрын
@@BekBrace Nagrywaj więcej materiałów :)
WSL 2 is a good Terminal with Ubuntu so you have all the right tools
Great tutorial! Is there any bigger FastAPI (like an advanced one or something) on the way? that'd be awesome!
@BekBrace
Жыл бұрын
Thank you. A standalone no, but I'm preparing a big project taking vue js , fastapi, docker and authentication all in one application.
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!
Good crash course to learn fastapi, and I'll prefer visual studio code the most!
@BekBrace
Жыл бұрын
Thanks 👍
I did this course really fast.
@BekBrace
9 ай бұрын
Great to hear, thank you for watching 🙂
I use visual studio code very often
awesome
@BekBrace
2 жыл бұрын
Thank you 🙏
Always vscode, very comfortable
@BekBrace
3 жыл бұрын
I feel the same with vscode
Thanks man for this course , i learned a lot , and also i always work with visual studio code
@BekBrace
2 жыл бұрын
Cool 👍
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
3 жыл бұрын
Thank you 🙏 Riscaverse for your support - I’m preparing currently a tutorial for the FARM stack ( FastAPI - React - MongoDB )
Goroutines(Go) Vs Coroutines (fastapi)
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
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 :)
Great tutorial 💯 BTW which font you're using?
@BekBrace
2 жыл бұрын
Thank you Pawel 🙂 theme is called Material
@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.
What will be the changes in the code if body contains more than 1 property, right now we have one "Activity". Thanks.
what is async/await ?
@BekBrace
3 жыл бұрын
Take a look to my series of simplified concepts in python, I talked about the asyncio library :)
NeoVIM !!!
VSCode for the last two years. Also, never do anything in Python without pipenv.
I work in visual studio code all the time
@BekBrace
2 жыл бұрын
Nice 👍
@confidential303
2 жыл бұрын
I am sorry to hear that :S
❤❤❤
@BekBrace
3 ай бұрын
🤗
I like atom but it doesn’t work ok anymore. now I use visual studio code
@BekBrace
3 жыл бұрын
Used to work with atom too for a while
I like VIM
why did we install starlette? i dont recall using it?
@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
3 жыл бұрын
@@BekBrace You don't need to install Starlette separately, it is installed together with FastAPI.
@BekBrace
3 жыл бұрын
@@yarmik3d Yes, it's true - Thank you Yaroslav
I have created localhost from Docker image. Can FastAPI be used with docker image localhost environment?
@BekBrace
Жыл бұрын
Yes
Could you create one video that returns a dB model? Thanks
@BekBrace
2 жыл бұрын
Have you checked my FARM stack course ?
@jaimedpcaus1
2 жыл бұрын
@@BekBrace OH no, have not but will try to review. 🙂
@BekBrace
2 жыл бұрын
@@jaimedpcaus1 this is a course showing how fastapi - mongodb - react can work together / you'll find it in fullstack playlist 🙏🙂
@jaimedpcaus1
2 жыл бұрын
@@BekBrace 🙂 OH ths. I will go and find it. Thank you and have a great day.
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
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.
can you create a whole ecommerce site and web apps with fast and react?
@BekBrace
2 жыл бұрын
Yes definitely I can. Would you be interested in such tutorial ?
@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
i use vim
VIM
@natedrake3256
3 жыл бұрын
Is VIM difficult ?
@BekBrace
3 жыл бұрын
VI is a code editor, but what do you use as IDE ?
I am using vscode
Why you are mentioning -> dict after a function? By default the function will return dictionary only. Could you please explain.
@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
3 жыл бұрын
@@BekBrace Thank you for the clarification 🙌🏻
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
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
3 жыл бұрын
There it is : kzread.info/dash/bejne/oXur1dybc6ubipc.html
@annabominakiran5934
3 жыл бұрын
I’m working on Angular..!!
@annabominakiran5934
3 жыл бұрын
Do u have the same thing with Angular instead of react..??
@BekBrace
3 жыл бұрын
@@annabominakiran5934 no
VS Code
VSC
@Lerklinten
3 жыл бұрын
Really good vids you are making- learning a lot
@BekBrace
3 жыл бұрын
Thank you, David, I’m glad to hear that
vscode
@BekBrace
2 жыл бұрын
The Best
Who else is here from hng😂
@sidneydjango
19 күн бұрын
It is well 😂😂
@BekBrace
19 күн бұрын
What is hng?
@sidneydjango
19 күн бұрын
It's an internship program
vscode
@BekBrace
2 жыл бұрын
Me too 😀