Python FAST API Tutorial

  Рет қаралды 318,944

Tech With Tim

Tech With Tim

Күн бұрын

Welcome back to my channel! In this video, I will be showing you FastAPI which is a Python framework. As the name suggests, this allows us to make APIs in Python.
💻 Checkout Intel's OpenVINO toolkit for FREE and start building and deploying AI/ML applications with the DevCloud for the edge! intel.ly/3whdRWo #sponsored
📄 Resources 📄
FAST-API Docs: fastapi.tiangolo.com/
Fix Pip (Windows): • How to Install Pygame ...
Fix Pip (Mac/Linux): • How to Install Pygame ...
⭐️ Timestamps ⭐️
00:00 | Introduction
02:22 | FAST-API Advantages
04:49 | Installing FastAPI
06:26 | Writing Our First FAST-API API
10:58 | Running Our API
14:00 | What is an API
16:35 | JSON Explanation
18:16 | Creating More Endpoints & GET Method
19:19 | Path/Endpoint Parameters
27:19 | Query Parameters
35:19 | Request Body & POST Method
44:12 | PUT Method
50:42 | Delete Method
53:15 | Status Codes and Error Responses
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
💰 Courses & Merch 💰
💻 The Fundamentals of Programming w/ Python: tech-with-tim.teachable.com/p...
👕 Merchandise: teespring.com/stores/tech-wit...
🔗 Social Medias 🔗
📸 Instagram: / tech_with_tim
📱 Twitter: / techwithtimm
⭐ Discord: / discord
📝 LinkedIn: / tim-ruscica-82631b179
🌎 Website: techwithtim.net
📂 GitHub: github.com/techwithtim
🔊 Podcast: anchor.fm/tech-with-tim
🎬 My KZbin Gear 🎬
🎥 Main Camera (EOS Canon 90D): amzn.to/3cY23y9
🎥 Secondary Camera (Panasonic Lumix G7): amzn.to/3fl2iEV
📹 Main Lens (EFS 24mm f/2.8): amzn.to/2Yuol5r
🕹 Tripod: amzn.to/3hpSprv
🎤 Main Microphone (Rode NT1): amzn.to/2HrZxXc
🎤 Secondary Microphone (Synco Wireless Lapel System): amzn.to/3e07Swl
🎤 Third Microphone (Rode NTG4+): amzn.to/3oi0v8Z
☀️ Lights: amzn.to/2ApeiXr
⌨ Keyboard (Daskeyboard 4Q): amzn.to/2YpN5vm
🖱 Mouse (Logitech MX Master): amzn.to/2HsmRDN
📸 Webcam (Logitech 1080p Pro): amzn.to/2B2IXcQ
📢 Speaker (Beats Pill): amzn.to/2XYc5ef
🎧 Headphones (Bose Quiet Comfort 35): amzn.to/2MWbl3e
🌞 Lamp (BenQ E-reading Lamp): amzn.to/3e0UCr8
🌞 Secondary Lamp (BenQ Screenbar Plus): amzn.to/30Dtafi
💻 Monitor (BenQ EX2780Q): amzn.to/2HsmUPZ
💻 Monitor (LG Ultrawide 34WN750): amzn.to/3dSD7tS
🎙 Mic Boom Arm (Rode PSA 1): amzn.to/30EZw9m
🎚 Audio Interface (Focusrite Scarlet 4i4): amzn.to/2TjXsih
💸 Donations 💸
💵 One-Time Donations: www.paypal.com/donate?hosted_...
💰 Patreon: / techwithtim
◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️◼️
⭐️ Tags ⭐️
-Tech With Tim
- Fast API
- Fast API Tutorial
- Python API
- Python FastAPI Tutorial
⭐️ Hashtags ⭐️
#TechWithTiim #FastAPITutorial

Пікірлер: 263
@worzell5169
@worzell5169 2 жыл бұрын
43:49 for anyone wondering, he changed the function parameters to be def get_item(name: str = Query(None, title="Name", description="Name of item.", max_length=10, min_length=2)):
@s4lm._179
@s4lm._179 3 жыл бұрын
Just when i thought of learning about API, there comes Tim
@manojkumark3934
@manojkumark3934 3 жыл бұрын
me to
@55.yashgoyal40
@55.yashgoyal40 3 жыл бұрын
Same bro
@tsoraizw
@tsoraizw 3 жыл бұрын
I bet he can read minds😂😂
@mike_vahemoubayed8099
@mike_vahemoubayed8099 3 жыл бұрын
Same!
@Julien-hg8jh
@Julien-hg8jh 3 жыл бұрын
Same !
@thegimel
@thegimel 3 жыл бұрын
Great video Tim! Would love to see a follow-up video where you show how to build a web micro-service (using FastAPI) for machine learning model inference
@martinag6607
@martinag6607 2 жыл бұрын
I finally understand API and all thanks to you, Tim, thank you so so much for making these! Super grateful for your sharing of knowledge!! Thanks and stay so cool :)
@ajiteshkumar
@ajiteshkumar 3 жыл бұрын
Tim is always here the same second i want to learn something. Thank you!
@Musava
@Musava 3 жыл бұрын
Even though i know most basic and intermediate stuff, i still watch every single second of this video to not miss any information
@kenny-kvibe
@kenny-kvibe 3 жыл бұрын
This was epic, I was watching for 3 hours straight, and I've implemented a chilld class of FastAPI with a function that saves data into file.json when requests succeed. Great module I love it ! & great video, thank you very much! All that is missing is the cors, xss security things, let the research continue :D
@SeattleDataGuy
@SeattleDataGuy 3 жыл бұрын
I have been looking to get into FastAPI and compare it to Flask(which is what I usually use for a lot of dev). This was a great in depth intro and more! Thank you.
@richisgood22
@richisgood22 Жыл бұрын
I wish I could upvote you more! Thank you so much for all of the help you've provided me over the years. You're amazing!
@user-ke4yx6uw1r
@user-ke4yx6uw1r 3 жыл бұрын
I have been working with Django and thinking about to give a try with fast api and flask. And here comes Tim with a fast api tutorial, Thank you Tim
@pauldickman4379
@pauldickman4379 Жыл бұрын
The asterisk part just cracks me up. One of those things. Super great tutorial btw, thank you for taking so much time to make it high quality. Still holds up well 2 years later and that is hard to do nowadays.
@joddden
@joddden 2 жыл бұрын
I absolutely love you man, my genius hero! You coincidentally have videos on things I need for work AND things I'm just interested in that I thought was way too specific to me, like the NEAT series.
@nomoremuda
@nomoremuda 3 жыл бұрын
This is fantastic, Tim, I needed this for my current projects
@pinakastra
@pinakastra 3 жыл бұрын
Just what I wanted to learn and that too in short n crisp (also enough detailed to get started). Thanks
@Nick-kd9no
@Nick-kd9no 2 жыл бұрын
best short intro to FastAPI. Thank you Tim
@bh3553
@bh3553 3 жыл бұрын
Somewhere around 25 minutes, your face cam is over the relevant code. Still very informative
@arunavamaulik19
@arunavamaulik19 2 жыл бұрын
@Josh Yorko This comment needs to be pinned!
@JeffreyWagner7
@JeffreyWagner7 5 ай бұрын
Better to just get rid of the face cam anyhow. Why do we need to see anyone's face between intro and outro?
@Studywise_io
@Studywise_io 2 ай бұрын
def get_item(item_id: int = Path(description="the id of the item you want to view", gt=0) ): return inventory[item_id]
@Sciencedoneright
@Sciencedoneright 3 жыл бұрын
Dude. You're reading our minds. I was just thinking about learning FastAPI and, you made this video!!!
@aakashjana6225
@aakashjana6225 3 жыл бұрын
we only think of what they feed to us. not a big surprise nowadays anymore
@sineadward5225
@sineadward5225 Жыл бұрын
@@aakashjana6225 What technologies are you working with/do you enjoy working with?
@aakashjana6225
@aakashjana6225 Жыл бұрын
@@sineadward5225 interestingly these days I am working with system verilog ( hardware description language) to work with FPGAs. Should take a look at it, it's very interesting fir chip design.
@sovietcat4825
@sovietcat4825 3 жыл бұрын
great vid i didn't know you can do this until now... very infomative
@zarrycherry
@zarrycherry 2 жыл бұрын
Great to follow except for the part where you have your face cam over the code your write. Also when you transition from query parameters to the next topic your code for get_item is different and as we follow along we still have our required fields when trying to get an item after our 2 items added through post, the get_item method you used simply asks for the item name.
@neclis7777
@neclis7777 2 жыл бұрын
Yes, this exactly :). The video is great, but as you underline in the conclusion of the video, the important part is the difference between Path & Query which you seem to have cut in your video ! THank you for all your content Tim, keep it up !
@lifebelowyourmeans5454
@lifebelowyourmeans5454 2 жыл бұрын
ya had the same problem. got kinda stuck lol.
@mawe4585
@mawe4585 2 жыл бұрын
Mee too! Great video but this part around 26:00 is impossible to follow.
@dawit100100
@dawit100100 2 жыл бұрын
here is the part of the code which is not visible on part around 26:00 def get_item(item_id: int = Path(None, description="The Id of the item you'd like to view", gt=0, lt=2)):
@EnglishRain
@EnglishRain Жыл бұрын
Thanks a TON for Zooming in!
@michakacprzak8984
@michakacprzak8984 3 жыл бұрын
Really nice introduction to FAST API, thanks Tim
@binaprajapati3593
@binaprajapati3593 3 жыл бұрын
I am not first. I am not last. But when Tim uploads, I click fast 😎😎
@ikennamanagwu9646
@ikennamanagwu9646 3 жыл бұрын
You should have been a rapper... Eminem needs lessons
@procode6881
@procode6881 3 жыл бұрын
Was waiting waiting for this ...first one to get it!
@Meenimie
@Meenimie Жыл бұрын
Tim, you're the best at what you do. Please, keep it up because we need you.
@sanjeevKumar-eg6hp
@sanjeevKumar-eg6hp Жыл бұрын
Thanks for precise and to the point explanation of FAST-API. It was nice leaning at this pace
@kemalcihanbastak8476
@kemalcihanbastak8476 3 жыл бұрын
Hey Tim could you make tutorials about advanced topics like Kafka and Elasticsearch with Python. Btw great explanation.
@k2theboss47
@k2theboss47 3 жыл бұрын
Thanks Tim, this is insanely valuable!!!
@parameshkumar6580
@parameshkumar6580 6 ай бұрын
Thank You Tim ,Great video I like the way how you used dictionary first then introduced classes
@rasheedibraheem6839
@rasheedibraheem6839 Жыл бұрын
A great tutorial! Very helpful, many thanks Tim
@tomdanielsofficial
@tomdanielsofficial 2 жыл бұрын
Thank you so much for this great video! It helped me finish my homework for python class which would have been due tomorrow :)
@whichdude420
@whichdude420 3 жыл бұрын
Glad more people are trying out FastAPI ^^
@iscodav
@iscodav 2 жыл бұрын
Thank you very much. That was a great experience to get to start with FastAPI
@emailvinz
@emailvinz Жыл бұрын
Great tuto as usual, thanks Tim !
@Betty-dc9ky
@Betty-dc9ky Жыл бұрын
Thank you Tim for this tutorial. Found it really useful.
@mysneekers5862
@mysneekers5862 3 жыл бұрын
This guy is great! Thanks for your tutorials.
@romanviktordvorak76
@romanviktordvorak76 Жыл бұрын
Great introduction to FastAPI. Thank You!
@KAREKINFPV
@KAREKINFPV Жыл бұрын
This is incredible! Thank you so much!
@thehandydandy
@thehandydandy 3 жыл бұрын
Please do some more fastapi videos, the library is still new and there isn't much tutorials out there. Great thing is that the documenting is really good.
@alexnefayne4266
@alexnefayne4266 Жыл бұрын
Thanks Tim another great tutorial i find these so usefull
@yassinebenazzouz7170
@yassinebenazzouz7170 Жыл бұрын
just watched your flask restful api and this one, perfect !
@The1neo34
@The1neo34 Жыл бұрын
Thank you! Best video on APIs I have watched to date
@shnuiiwithdoublei
@shnuiiwithdoublei 4 ай бұрын
Such an underrated video
@efajunk
@efajunk Жыл бұрын
Thank you very much. Absolutely useful info about this framework!
@milesmatic2872
@milesmatic2872 3 жыл бұрын
Awesome tutorial, very helpful!
@NMNaufaldo
@NMNaufaldo 2 жыл бұрын
Waw I was just amazed how fast & easy to build an API with this framework 🚀
@emilijamarjanovic5497
@emilijamarjanovic5497 2 жыл бұрын
Great tutorial, thank you very much!
@hackynawhat
@hackynawhat 3 жыл бұрын
This was what I actually needed 😊😊😊
@arrvind7385
@arrvind7385 2 жыл бұрын
Tons of thanks , Really Superb explanation
@nigeldavis
@nigeldavis 3 жыл бұрын
i just started a job where im going to be using FastAPI this is perfect!
@emmanouilmorfiadakis118
@emmanouilmorfiadakis118 2 жыл бұрын
Very Good Explanation.Thank you
@rembautimes8808
@rembautimes8808 2 жыл бұрын
Bye bye Django. Thanks for this excellent tutorial. Exactly what I was looking for and the automated documentation is a big win. Did the trifecta- liked , subscribed and comment ( From Singapore)
@markruiz9397
@markruiz9397 2 жыл бұрын
Please keep the FastAPI material coming!!!
@wakweikafelix
@wakweikafelix Жыл бұрын
Thank you for sharing!
@shashankm4363
@shashankm4363 3 жыл бұрын
YES... New video from tim!!!!!!
@EpicGamer-ux1tu
@EpicGamer-ux1tu Жыл бұрын
Great vid Tim! Thanks.
@GreenfieldOTTYS14
@GreenfieldOTTYS14 2 жыл бұрын
amazing, thank you so much!
@islamh6042
@islamh6042 Жыл бұрын
Thanks Tim!
@gecsus
@gecsus 2 жыл бұрын
Tim, at time 26:00 you are adding things we can't see for Greater than >. Your popover window either covered it or you were showing the wrong part of the screen. So we are unable to type what you typed. Generally, your videos are really good, so please review them carefully.
@ignabelitzky
@ignabelitzky Жыл бұрын
def get_item(item_id: int = Path(None, description = "The ID of the item you'd like to view.", le=1)):
@user-re1vj1jx4r
@user-re1vj1jx4r Жыл бұрын
Great one!
@samozturk8276
@samozturk8276 3 жыл бұрын
@50:51 Tim forgot to type "from fastapi import Query" on top of the code.
@ceres11
@ceres11 2 жыл бұрын
he really forgot that
@lifebelowyourmeans5454
@lifebelowyourmeans5454 2 жыл бұрын
thanks man
@riperboyxl3216
@riperboyxl3216 Жыл бұрын
dude this tutorial is GREAT
@uptightowl3801
@uptightowl3801 3 жыл бұрын
TIM PLEASE be my dad 😩😩😩 these tutorials are amazing. I haven’t watched it yet but I saw the channel and clicked
@speedygod4446
@speedygod4446 3 жыл бұрын
😂
@evanshlom1
@evanshlom1 2 жыл бұрын
This is a great intro to fastapi
@sanduchicu7545
@sanduchicu7545 3 жыл бұрын
Very helpful thx a lot. gl with ur channel in the future ;)
@noobypro4560
@noobypro4560 3 жыл бұрын
Thanks tim for providing this usefull contents
@gustavojuantorena
@gustavojuantorena 3 жыл бұрын
Great content ! Thank you
@rahulkmail
@rahulkmail 3 жыл бұрын
Excellent tutorial
@xXJM01Xx
@xXJM01Xx 2 жыл бұрын
Great video, I knew this was a great library that I should learn and the video did a very good job of getting my feet wet.
@Latif127
@Latif127 7 ай бұрын
It is a nice tutorial. Thank you
@abdallahkharoby4180
@abdallahkharoby4180 2 жыл бұрын
Your are really awesome thank you very much, hope you make one day a video about scrapy library so that we can scrap an api from any website we want.
@Robizd1
@Robizd1 2 жыл бұрын
You could have used PATCH method instead of PUT method for updating items. PATCH allows you to partially update item. Btw nice video
@yessirski7868
@yessirski7868 5 ай бұрын
do they work the same in terms of the perameters?
@GelsYT
@GelsYT Жыл бұрын
THANK YOU!!!
@johnnyt.2523
@johnnyt.2523 3 жыл бұрын
Outrageous! xD
@AtulKumar-zu5hx
@AtulKumar-zu5hx Жыл бұрын
great explanation
@saloniparekh3999
@saloniparekh3999 3 жыл бұрын
wow this was really great, can you also post videos for DS and Algos to prepare for job interviews.
@gianniprocida3332
@gianniprocida3332 2 жыл бұрын
Excellent!
@MansiBansalc
@MansiBansalc 4 күн бұрын
48:17 here we can directly write inventory[item] = item and this will return the updated value
@samozturk8276
@samozturk8276 3 жыл бұрын
Hello Tim, nice tutorial. But at some parts, I couldn't see the code because of the portrait :D Are there any repo for this or something like that?
@Elekks
@Elekks Жыл бұрын
Consider maybe moving you're camera to the top right of the screen. Around 26:27ish you were blocking the syntax for less than and greater than operators. Not a huge deal but could make the video easier to follow.
@malachimathins9390
@malachimathins9390 7 ай бұрын
Great Video Tim "Hey everyone! I just wanted to share my experience with different code editors. I've tried various IDEs, including VS Code and Visual Studio, and I ran into some issues that were frustrating to deal with. so its best to use sublime text like in the video
@arturmostowiak9427
@arturmostowiak9427 2 жыл бұрын
The PUT method is not necessarily a method that updates something. For this you have PATCH method. PUT is in short : create a resource or update it if it exists.
@ChrisHalden007
@ChrisHalden007 2 жыл бұрын
Great video. Thanks
@gnvageesh6467
@gnvageesh6467 3 жыл бұрын
That's cool and easy for those who have experience with Flask... Could make a tutorial on Python and Firebase like a backend tutorial
@mike_vahemoubayed8099
@mike_vahemoubayed8099 3 жыл бұрын
That would be awesome, I never used firebase, that would be nice to learn
@gnvageesh6467
@gnvageesh6467 3 жыл бұрын
@@mike_vahemoubayed8099 yes...
@drewprof
@drewprof 3 жыл бұрын
Good vid Tim!
@anshuman4mrkl
@anshuman4mrkl 3 жыл бұрын
Clearly explained
@elishashmalo3731
@elishashmalo3731 3 жыл бұрын
FINALLY!!!
@iho2437
@iho2437 2 жыл бұрын
Based Tim with the API knowledge.
@hakim6801
@hakim6801 2 жыл бұрын
Great Job ..... Thanks
@tcgvsocg1458
@tcgvsocg1458 3 жыл бұрын
Well its time to click a like bouton on all video and...tyx a lot for all you video
@ashraf736
@ashraf736 2 жыл бұрын
Nice explanation
@JohanMonard
@JohanMonard 2 жыл бұрын
Great tutorial, could you add a section showing how to secure API access with user login/pwd?
@stefan.musarra
@stefan.musarra 5 күн бұрын
Hey Tim - very well structured. Thank you! Is there a github repo for the code? That would be a lot easier than typing it in and then resolving typos.💚
@lucastavares7767
@lucastavares7767 2 жыл бұрын
Very Good, from Brazil 🇧🇷😃👍
@sakethgupta2885
@sakethgupta2885 3 жыл бұрын
Make a tutorial on media pipe which helps us a lot in object recognition, and boosts the capability of opencv
@leonWischmeyer
@leonWischmeyer 3 жыл бұрын
Pls make your cam in the top right corner and make it a bit smaler. The tutorial is very nice. When you have experience with flask fastapi is very easy to learn.
@gustavo8433
@gustavo8433 2 жыл бұрын
Thanks for the tutorial !! I need to put some dash/ plotly elements into my API. is it possible ? how could this be done ?
@jeroenvermunt3372
@jeroenvermunt3372 2 жыл бұрын
Could you do a quick little tutorial on how to connect this with a persistent database
@saifuddinraja
@saifuddinraja 2 жыл бұрын
love you bro
@Chris815
@Chris815 Жыл бұрын
Thanks
@rangabharath4253
@rangabharath4253 3 жыл бұрын
Awesome
Python Asynchronous Programming - AsyncIO & Async/Await
25:57
Tech With Tim
Рет қаралды 416 М.
REST API Crash Course - Introduction + Full Python API Tutorial
51:57
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 38 МЛН
She ruined my dominos! 😭 Cool train tool helps me #gadget
00:40
Go Gizmo!
Рет қаралды 58 МЛН
Каха ограбил банк
01:00
К-Media
Рет қаралды 10 МЛН
How To Create a Python API With FastAPI - Full Tutorial
25:39
Tech With Tim
Рет қаралды 30 М.
How to Use FastAPI: A Detailed Python Tutorial
20:38
ArjanCodes
Рет қаралды 214 М.
The most important Python script I ever wrote
19:58
John Watson Rooney
Рет қаралды 151 М.
Are headphones destroying our hearing?
6:49
Vox
Рет қаралды 373 М.
Why You NEED To Learn FastAPI | Hands On Project
21:15
Travis Media
Рет қаралды 149 М.
Python As Fast as Possible - Learn Python in ~75 Minutes
1:19:41
Tech With Tim
Рет қаралды 1,7 МЛН
FastAPI Authentication with  JWT (JSON Web Tokens)
56:18
Bek Brace
Рет қаралды 94 М.
FastAPI Tutorial - Building RESTful APIs with Python
1:03:10
Amigoscode
Рет қаралды 229 М.
APIs for Beginners - How to use an API (Full Course / Tutorial)
2:19:33
freeCodeCamp.org
Рет қаралды 4,3 МЛН
Python 101: Learn the 5 Must-Know Concepts
20:00
Tech With Tim
Рет қаралды 1,1 МЛН
Can You Draw A PERFECTLY Dotted Line?
00:55
Stokes Twins
Рет қаралды 38 МЛН