As a note I am 2 hours in right now and have a couple things to note: 1) This tutorial is very helpful. You are doing an awesome job explaining the content and I like that you show when you make a minor mistake. 2) If you have made it to the point that your are implementing update and delete and are watching your console as well as using the docs you have probably noticed that the console is throwing errors for these 2 functions. You are not crazy. Because we are running this with the --reload parameter the crashes are ignored and the page is instantly reloaded. You will notice that the actions are being executed properly and can be seen doing so in the docs and the database viewer. The crash is happening for a different reason on each function: Delete - When using status code 404 your return message can have no body. What that means is when he is send a message "Blog successfully deleted", or whatever was written, it isn't actually able to be sent and is causing a crash (which is hidden by --reload). You can fix this by having your return statement say -> return Response(status_code=status.HTTP_204_NO_CONTENT) Update - When using db.query(models.Blog).filter(models.Blog.id == id).update(request) you are saying to attempt and update every item that would be passed in the request. In doing this you allow it to attempt and change attributes that have no data or attributes that you may not think exist. This is what causes the crash here (again hidden by --reload). You can fix this with a minor change to the statement -> db.query(models.Blog).filter(models.Blog.id == id).update(request.dict()) It is my belief that by specifying that you wish to update the request dictionary you are attempting to change only those items that have been specified in the request instead of writing over everything. Again I really do love this tutorial and am learning a lot from this. I just wanted to help some people out because I know it was bothering me that I was seeing crash reports that weren't being shown on your side.
Thank you very much, @James Phillips, I am searching for this solution everywhere, except this comment section. when I see this I got it correct and the code is working fine. thanks and thanks for Bitfumes also. looking forward to more videos like this...❤❤
I have never seen youtube content this detailed. Most times when I start a course I stop halfway because I keep running into errors that the tutor didn't warn me about. But here, you've given every detail and made the learning process enjoyable. Also, you have a very calming and reassuring voice. Thanks for sharing.
This is the best API creating tutorial I have ever watch in my entire life, I just watch it for 4 hours straight, very helpful, easy to follow. Thank you so so much for your excellent work. Very appreciate it!
Note that in order to enforce authentication in the entire sub route you can add "dependencies=[Depends(get_current_user)]" to the APIRouter constructor instead of adding it individually to all the methods (which you may or may not prefer)
You have very cool courses, I completed a whole course on Vue while filling a whole notebook with notes. This 10 hour course on Vue took me two months but it was a solid learning experience. Now I need an API to generate a list of books I have at home, so I will be learning FastAPI from your course. Greetings from Poland.
This is seriously an A class tutorial, easy to follow, no garbage codes and not making unnecessarily complex, and most importantly, production friendly, helped me a lot, thanks :)
For the guys with problem with UPDATE method. Just add a request within a dir() method, ex: db.query(models.Blog).filter(models.Blog.id == id).update(dict(request)) That's it.
FastApi also has the jsonable_encoder method for this too. It converts a pydantic model to a dict and also ensures fields that aren't JSON compatible are converted to JSON friendly types.
I must say this is an excellent tutorial. I like the way you touched bases with all the basic concepts and I don't have to google around the technical jargons. Great job mate. Excellent quality stuff for an absolute beginner. I highly appreciate it. Cheers!
i had been working over other tools and framework for developing API's, So wanted some POC to be done to ensure we can start some migration an this helped me a lot understanding concepts of FATSAPI and hands on. This is simply awesome
This came at the right time, am halfway through the documentation and this video tutorial is really going to help, am planning to start using FastAPI for my IOT Application
Very nicely explained, not like other videos.. where they try to show magic by writing a set of commands, here you referred to documentation for each line, so if we get stuck we know where and what to refer.. Thanks on this
This is an excellent tutorial to watch! I highly recommend it for anyone starting with FastAPI. The explanations are clear and thorough. Thank you so much for this wonderful tutorial. Please continue making videos like this. Happy coding!🎉❤
omg, your video is amazing!!! %100 clear! for my first job interview I had to do an API and I prepared with this video and got the job!!! THANK YOU THANK YOU THANK YOU
Hi Bro, I really liked this video because it goes beyond the basic CRUD operations that most TH-cam videos cover. It was exactly what I needed to clear up my doubts. Thank you for the detailed explanation....
Thank you so much for creating this course. This is truly amazing, especially where you go over the documentation and show how to find the neccecary information. Really enjoyed your course.
This is an extensive and detailed tutorial for fastapi. I truely enjoyed it. I faced some issues with update and OAuth2PasswordRequestForm submit. But I am able to resolve by myself. Again Thanks for this tutorial.
I like this tuto just as much as I like the vueJs one. The only think that many youtubers have to take care is that to switch from dark to light mode is frustrating. Your browser should be in dark mode also or your IDE in light mode as your browser. Thank you!
This tutorial carried me through the whole time I have been trying to teach myself FASTAPI. Though I don't know if I can repeat everything I just did smoothly (Don't get me wrong I didn't do it in one go, took a week or soo), I know doing so would be less difficult. And I thank you so much for all the effort and time invested in here Sir🙏
Your help is much appreciated, suggestion for any other framework ?? Thanks for your love and support, keep learning. Subscribe to bitfumes newsletters bitfumes.com/newsletters
@@Bitfumes I would love to see a Rust course. I have been looking at actix and I'm still trying to decide if I should go with Python which I'm pretty comfortable with or keep learning Rust.
Thank you so much for the class brother. I am very new to python and RESTAPI learned much with this video and i just want to know more like having a real server deployment
Thank you for this video! My English is not good, but this video is very clear. This is best course on TH-cam now. I wish you success with the development of your TH-cam channel!
Please add a note for correction at 2:04:06 update({'title': request.title, 'body': request.body}) May be FastAPI codes changed and just 'request' gives 'AttributeError' now.
Here, you will mostly find reviews saying that this tutorial is the best and all, but let me give you an honest review: this tutorial is not beginner-friendly, and the instructor is making it really complicated. I am only commenting here because I want to let those who are not understanding this properly know that you are not alone. In the comments section, you will find positive comments, and you may think that you are the only one who is unable to understand this, but that is not the truth.
Assalomu aleykum, Mr Sarthak Thank you very much for your tutorial, I really like it and got so much . hope you are not stopping making videos about FastAPI and good luck for your job!!!!!!!!🥰🥰🥰🥰🥰
This is very helpful for me and superduper for me... Happy to learn many things from there.... Keep it up... too much easy and well understanding concepts there.... Amazingggggggggggggg
As I am watching your content 1st time and it's really awesome. The way you explained every small thing in detail is too good. I have used Flask and Django both in my past and now I wanted to switch and after watching your video I have made my mind to use FastAPI. Thanks a lot for pushing this quality content and yes I am gonna hit that red and bell button.
Sir, I am new in backend.I can't understand the sqlalchemy. Did he connects his project in sqlite Database? I have no idea about database. Please help me. Should i learn sqlite database then come here to complete the full course?? Help plz😢
Thanks a lot for the video! Followed till the end, I'm currently battling how to get current authenticated user id, so instead of the owner-id used as 1
Wow !! This is a great tutorial because at first I thought about the mistakes you are making confused me ..the second time I was watching the video correct the mistakes myself before you correct them😂✌️👍
This is absolutely amazing tutorial. Very helpful. Three requests: 1) pls share code so we can walk thru and learn better 2) can you extend the user creation section to include verification via email and 3) extend the project to include vue3 frontend that includes vuex/routers/axios. Thank you.
those who are not able to import schemas as 'from . import schemas' try 'import schemas' instead, this will work as both main and schemas are in same file.
Why do you prefer ```db.query(models.Blog).filter(models.Blog.id == id).first()``` over ```db.query(models.Blog).get(id)``` for a get one by id request ? The second one seems to have a far lighter and more clear syntax...is there any logic reasons to not use it ?
Thank you for this! This was an amazing tutorial that was extremely helpful! I never struggled with any issues, infact even my deployment at the end was getting all the blogs once I authenticated, maybe there was an update that fixed that porting issue. Once again thanks!
Good tutorial. Awesome work. I just have one minor issue: Please when you are importing stuff from different packages. Please mention installing that package. Or just do a simple pip3 list to tell us what all modules you have in your virtual env. It took me 20 mins to resolve the SQLalchemy package import error (Cuz it was never installed) lol. But still. Good work. God speed mate.
Please like and comment which portion of this course you liked most
Watched till 2:04:06, I liked the way u described this Framework.
It' nice to see my name on login credentials 😂
Thanks for course. It's understandable.
@@himanshutewari8503 eueeeee
JWT and Oauth2 very nice
As a note I am 2 hours in right now and have a couple things to note:
1) This tutorial is very helpful. You are doing an awesome job explaining the content and I like that you show when you make a minor mistake.
2) If you have made it to the point that your are implementing update and delete and are watching your console as well as using the docs you have probably noticed that the console is throwing errors for these 2 functions. You are not crazy. Because we are running this with the --reload parameter the crashes are ignored and the page is instantly reloaded. You will notice that the actions are being executed properly and can be seen doing so in the docs and the database viewer. The crash is happening for a different reason on each function:
Delete - When using status code 404 your return message can have no body. What that means is when he is send a message "Blog successfully deleted", or whatever was written, it isn't actually able to be sent and is causing a crash (which is hidden by --reload). You can fix this by having your return statement say ->
return Response(status_code=status.HTTP_204_NO_CONTENT)
Update - When using db.query(models.Blog).filter(models.Blog.id == id).update(request) you are saying to attempt and update every item that would be passed in the request. In doing this you allow it to attempt and change attributes that have no data or attributes that you may not think exist. This is what causes the crash here (again hidden by --reload). You can fix this with a minor change to the statement ->
db.query(models.Blog).filter(models.Blog.id == id).update(request.dict())
It is my belief that by specifying that you wish to update the request dictionary you are attempting to change only those items that have been specified in the request instead of writing over everything.
Again I really do love this tutorial and am learning a lot from this. I just wanted to help some people out because I know it was bothering me that I was seeing crash reports that weren't being shown on your side.
Thank you for this.
that second point made me loose my mind your answer was helpful.thank you for your time to explain and kindness.KEEP HELPING.
Best comment to this video. Thank you!
thank you very much on providing solution to these issues.
Thank you very much, @James Phillips, I am searching for this solution everywhere, except this comment section. when I see this I got it correct and the code is working fine. thanks and thanks for Bitfumes also. looking forward to more videos like this...❤❤
I have never seen youtube content this detailed.
Most times when I start a course I stop halfway because I keep running into errors that the tutor didn't warn me about. But here, you've given every detail and made the learning process enjoyable.
Also, you have a very calming and reassuring voice.
Thanks for sharing.
This is the best API creating tutorial I have ever watch in my entire life, I just watch it for 4 hours straight, very helpful, easy to follow. Thank you so so much for your excellent work. Very appreciate it!
Thanks for your love and support, keep learning. Join bitfumes newsletter bitfumes.com/newsletters
Note that in order to enforce authentication in the entire sub route you can add "dependencies=[Depends(get_current_user)]" to the APIRouter constructor instead of adding it individually to all the methods (which you may or may not prefer)
But how to get user data in jwt token(payload)
@@massmedia6516 same question
You have very cool courses, I completed a whole course on Vue while filling a whole notebook with notes. This 10 hour course on Vue took me two months but it was a solid learning experience. Now I need an API to generate a list of books I have at home, so I will be learning FastAPI from your course. Greetings from Poland.
At 2:21:30 instead of using models.User(request), you can use models.User(**request.dict()) to unpack all the items in the dict
Yep; now models.User(**request.model_dump())
coming from 2024 and i can agree
BEST FASTAPI TUTORIAL IN THE TH-cam.
Salute Sirji.
21 topo ki salami.
Coming from Django background, most of things were easy to understand. tutor felt quit slow but it was worth it.
same here
Same, my employer wants me to know FastAPI
That’s what x1.5 is for
this is the best video so far on youtube from someone who can actually present and speak
this is what I call quality content
Thanks bro, keep learning. Subscribe to bitfumes newsletters
bitfumes.com/newsletters
This is seriously an A class tutorial, easy to follow, no garbage codes and not making unnecessarily complex, and most importantly, production friendly, helped me a lot, thanks :)
Glad you liked it!
Thanks for your love and support, keep learning. Join bitfumes newsletter bitfumes.com/newsletters
For the guys with problem with UPDATE method. Just add a request within a dir() method, ex:
db.query(models.Blog).filter(models.Blog.id == id).update(dict(request))
That's it.
Great, thaks very much!
FastApi also has the jsonable_encoder method for this too. It converts a pydantic model to a dict and also ensures fields that aren't JSON compatible are converted to JSON friendly types.
It's a premium course that you are providing free of cost, and every second of learning is love, Great video many thanks!!
Glad that you enjoyed it :)
Keep learning
Help me to reach 100k soon hehe
1 hr in and this tutorial is SO good. Please be my teacher for EVERYTHING ALWAYS!
I'm from Colombia, this course is great, the best part is authentication and JWT. Regards
I must say this is an excellent tutorial. I like the way you touched bases with all the basic concepts and I don't have to google around the technical jargons. Great job mate. Excellent quality stuff for an absolute beginner. I highly appreciate it. Cheers!
I was looking to buy course on fastAPI as I'am a beginner in python, but I found your video and it is simply amazing, Thank you for this tutorial
Glad it was helpful!
i had been working over other tools and framework for developing API's, So wanted some POC to be done to ensure we can start some migration an this helped me a lot understanding concepts of FATSAPI and hands on. This is simply awesome
This came at the right time, am halfway through the documentation and this video tutorial is really going to help, am planning to start using FastAPI for my IOT Application
That would be great, let me know what you are working on, DM me on Twitter
Very nicely explained, not like other videos.. where they try to show magic by writing a set of commands, here you referred to documentation for each line, so if we get stuck we know where and what to refer.. Thanks on this
Thanks bhai, glad you liked it
I will try to make videos like this
This is an excellent tutorial to watch! I highly recommend it for anyone starting with FastAPI. The explanations are clear and thorough. Thank you so much for this wonderful tutorial. Please continue making videos like this. Happy coding!🎉❤
thanks, this is the best FastAPI course on TH-cam right now. Full of actual examples, clear, detailes. Thank you!
Thanks for your love and support, keep learning. Subscribe to bitfumes newsletters
bitfumes.com/newsletters
Thank you very much, it helped me alot, it is the best course among fastapi lessons
programmer, teacher, comedian, BIG THX :)
Sarthak is awesome, coz we can see how he finds things also, its so cool.
thanks man
omg, your video is amazing!!! %100 clear! for my first job interview I had to do an API and I prepared with this video and got the job!!! THANK YOU THANK YOU THANK YOU
Great job!
I love this course, U clear every point with good manner, Thanks a lot sir
You are most welcome
Hi Bro,
I really liked this video because it goes beyond the basic CRUD operations that most TH-cam videos cover.
It was exactly what I needed to clear up my doubts. Thank you for the detailed explanation....
1hr 20 min in and i must say i love this, this is straight up tutorial and thanks
Thank you so much for creating this course. This is truly amazing, especially where you go over the documentation and show how to find the neccecary information. Really enjoyed your course.
I am in the 25:10 i can say you are professional when you try to teach, you even start teaching to us git, very nice, really thank you
This is an extensive and detailed tutorial for fastapi. I truely enjoyed it. I faced some issues with update and OAuth2PasswordRequestForm submit. But I am able to resolve by myself. Again Thanks for this tutorial.
Thanks for this nice review.
Please subscribe to my newsletter bitfumes.com/newsletters
I like this tuto just as much as I like the vueJs one. The only think that many youtubers have to take care is that to switch from dark to light mode is frustrating. Your browser should be in dark mode also or your IDE in light mode as your browser. Thank you!
This is a valid point bro, will take care of it
Thanks for your nice suggestion
This tutorial carried me through the whole time I have been trying to teach myself FASTAPI. Though I don't know if I can repeat everything I just did smoothly (Don't get me wrong I didn't do it in one go, took a week or soo), I know doing so would be less difficult. And I thank you so much for all the effort and time invested in here Sir🙏
Sarthak is amazing 🔥🔥🔥🔥
Your explanation is just Amazing !!! Crisp and Clear !! Thanks !!
Glad it was helpful!
The best API course I've ever seen so far
I don't know how to thank you. I would say it is the best course to start REST API service using FAST API
Only halfway trough the video, but commenting for the algorithm because so far it has been well explained. Good job and thanks for the video.
Your help is much appreciated, suggestion for any other framework ??
Thanks for your love and support, keep learning.
Subscribe to bitfumes newsletters
bitfumes.com/newsletters
@@Bitfumes I would love to see a Rust course. I have been looking at actix and I'm still trying to decide if I should go with Python which I'm pretty comfortable with or keep learning Rust.
Uh
My
Awesome! Iam learning Springboot and now am blownaway!!
Great, keep learning
Very cool. Was looking to begin my first project weeks ago and could not find any comprehensive FastAPI tutorial video. Thanks
This is all for you my brother,
Keep learning
Top notch quality content
Which is actually understandable
best fastapi fasttrack course on youtub . Thanks a ton
Glad you think so!
Much respect to the author! This tutorial is amazing!!!
Much appreciated!
To all the people who have been commenting for better reach, it's working. I got this amazing video in my recommendation.
Beautifully explained with lots of patience!! Hats off!!
Thanks for your love and support, keep learning. Subscribe to bitfumes newsletters
bitfumes.com/newsletters
This is great. Very straightforward Explanation.
thanks man
Thank you so much for the class brother. I am very new to python and RESTAPI learned much with this video and i just want to know more like having a real server deployment
Thank you for this video!
My English is not good, but this video is very clear. This is best course on TH-cam now.
I wish you success with the development of your TH-cam channel!
Thanks for your love and support, keep learning. Subscribe to bitfumes newsletters
bitfumes.com/newsletters
Very Useful Course Still Worth Watching . Hats Off
Thank you so much Sarthak, Amazing session 😃
thanks bhai
Please add a note for correction at 2:04:06 update({'title': request.title, 'body': request.body})
May be FastAPI codes changed and just 'request' gives 'AttributeError' now.
hey! and wt did u use to make it work btw?
best course on fast api for beginners
I am very happy today because i learned a lot about fastapi very easily..Thanks .
in update function ,make sure you pass in request.dict() in update(...) instead of just request
Thank you so much. it's been a week now i have been encountering an error. Your comment helped me.
Here, you will mostly find reviews saying that this tutorial is the best and all, but let me give you an honest review: this tutorial is not beginner-friendly, and the instructor is making it really complicated. I am only commenting here because I want to let those who are not understanding this properly know that you are not alone. In the comments section, you will find positive comments, and you may think that you are the only one who is unable to understand this, but that is not the truth.
hey thanks for your honest review.
I agree that it's not for absolute beginners.
but if you know python then it become easy
Commenting for the algorithm and liking before watching. Added to watch later.
Thank bro for your support.
@@Bitfumes Thanks for making the course man! I was hearing a lot about it these days.
Assalomu aleykum, Mr Sarthak Thank you very much for your tutorial, I really like it and got so much . hope you are not stopping making videos about FastAPI and good luck for your job!!!!!!!!🥰🥰🥰🥰🥰
What extensions do you use for vscode? It looks pretty well
The icons look like they're from the Material Icon Theme by Philipp Kief
Great Course! Thanks!!! Greetings from Brazil!!!
This is very helpful for me and superduper for me... Happy to learn many things from there.... Keep it up... too much easy and well understanding concepts there.... Amazingggggggggggggg
thanks for your support, please subscribe to bitfumes channel
This is the best guide to fast api , thanks for posting .
Glad you liked it
As I am watching your content 1st time and it's really awesome. The way you explained every small thing in detail is too good. I have used Flask and Django both in my past and now I wanted to switch and after watching your video I have made my mind to use FastAPI. Thanks a lot for pushing this quality content and yes I am gonna hit that red and bell button.
You are awesome Anuj,
Thanks for your love and support, keep learning. Subscribe to bitfumes newsletters
bitfumes.com/newsletters
Sir, I am new in backend.I can't understand the sqlalchemy. Did he connects his project in sqlite Database?
I have no idea about database. Please help me. Should i learn sqlite database then come here to complete the full course?? Help plz😢
It’s just fantastic 4 hours. Thank you very much sarthakbhai
thanks bro, Thanks for your love and support, keep learning. Subscribe to bitfumes newsletters
bitfumes.com/newsletters
Thanks a lot for the video! Followed till the end, I'm currently battling how to get current authenticated user id, so instead of the owner-id used as 1
I am currently trying to figure out the same. Could you walk me through the solution if you have figured it out?
The routing is just like flask, which makes flask devs slide into here(like me)!🤣
I saw almost all of the fastapi tutorials but none of them were as good as your videos.
Thanku Hadi for your awesome comment, please share for more reach
This is the best FastAPI tutorial out there! Thanks a lot Bitfumes.
Thanks for your love and support, keep learning. Subscribe to bitfumes newsletters
bitfumes.com/newsletters
Excellent!! Your explanation is very clear (so far I got 1 hour 20 min). I tried with two other tutor but not got detail as your are.
You're welcome!
your VScode gui is so good. How did you do that?🙂 Can you explain that for everyone?
Hi everyone, in 3.10 python we can specify `int | None`, for example, instead `Optional[int]`
Wow !! This is a great tutorial because at first I thought about the mistakes you are making confused me ..the second time I was watching the video correct the mistakes myself before you correct them😂✌️👍
Best FastAPI Course in the world!
Thanks for your love and support, keep learning. Subscribe to bitfumes newsletters
bitfumes.com/newsletters
thnx so much
This is absolutely amazing tutorial. Very helpful.
Three requests: 1) pls share code so we can walk thru and learn better 2) can you extend the user creation section to include verification via email and 3) extend the project to include vue3 frontend that includes vuex/routers/axios.
Thank you.
you can check code he added in description
good work! Subd due to the production quality and ofcourse the content.
Much appreciated!
Thanks for watching, please subscribe and like this video
thank you very much for this wonderfully tutorial, my fast API knowledge is not the same after going through the tutorial ... appreciated.
Glad to hear that
the best tutorial about this subject
Thanks for your love and support, keep learning. Subscribe to bitfumes newsletters
bitfumes.com/newsletters
Best course till date
Thanks bhai, keep learning
I've learned a lot from you. You're amazing, and I appreciate your clean code!
Great tutorial, the best fastAPI one ive found so far. Clear explanations and talking through the actual documentation, which is excellent
It's one of the best best best tutorial ❤.....
thanks man...
Thanks for your love and support, keep learning. Join bitfumes newsletter bitfumes.com/newsletters
This explanation is amazing!
thanks thanks
those who are not able to import schemas as 'from . import schemas' try 'import schemas' instead, this will work as both main and schemas are in same file.
Why do you prefer ```db.query(models.Blog).filter(models.Blog.id == id).first()``` over ```db.query(models.Blog).get(id)``` for a get one by id request ? The second one seems to have a far lighter and more clear syntax...is there any logic reasons to not use it ?
thank you very much for giving/teaching a valuable knowledge for free. Many thanks to you. Great video.
There is also an issue in repository -> blog.py. The create function (new_blog) has a hard-coded user_id. How do I get that from the logged-in user?
Thank you for this! This was an amazing tutorial that was extremely helpful! I never struggled with any issues, infact even my deployment at the end was getting all the blogs once I authenticated, maybe there was an update that fixed that porting issue. Once again thanks!
Thanks for watching, please subscribe and like this video
Thank you for sharing this tutorial. You guys from India really rocks
Great simple and on point tutorial. Thank you.
Very well explained and comprehensive. Highly recommended for beginners. Thanks for upload.
A very clear explanation tutorial
After Vue3 tutorial another boon from you to developer community. Thanks 3000.
Enjoy!
hat's off man!!!!!😍 But i hope this is not end game..😅upload more and more on fastApi
The best ever fastapi content of the world, thanks for this amazing course, I m from Brazil and I love your video, everything worked perfectly!!
Thanks for your love and support, keep learning. Subscribe to bitfumes newsletters
bitfumes.com/newsletters
You nailed it buddy I think your Indian Baja Phad diye tum toh
Django Social Media..
Your Biggest Fan!
Love From India...
Thanks for your love and support, keep learning. Subscribe to bitfumes newsletters
bitfumes.com/newsletters
You really love doing this, I can tell from how your voice starts out slow and your excitement increases as the section goes along. Qudos dude.
Good tutorial. Awesome work. I just have one minor issue: Please when you are importing stuff from different packages. Please mention installing that package. Or just do a simple pip3 list to tell us what all modules you have in your virtual env. It took me 20 mins to resolve the SQLalchemy package import error (Cuz it was never installed) lol. But still. Good work. God speed mate.