Python FAST API Tutorial

Поділитися
Вставка
  • Опубліковано 10 лют 2025

КОМЕНТАРІ • 264

  • @worzell5169
    @worzell5169 2 роки тому +73

    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 роки тому +166

    Just when i thought of learning about API, there comes Tim

  • @pauldickman4379
    @pauldickman4379 Рік тому +2

    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.

  • @sciencedoneright
    @sciencedoneright 3 роки тому +20

    Dude. You're reading our minds. I was just thinking about learning FastAPI and, you made this video!!!

    • @aakashjana6225
      @aakashjana6225 3 роки тому +2

      we only think of what they feed to us. not a big surprise nowadays anymore

    • @sineadward5225
      @sineadward5225 2 роки тому

      @@aakashjana6225 What technologies are you working with/do you enjoy working with?

    • @aakashjana6225
      @aakashjana6225 2 роки тому

      @@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.

  • @Musava
    @Musava 3 роки тому +3

    Even though i know most basic and intermediate stuff, i still watch every single second of this video to not miss any information

  • @richisgood22
    @richisgood22 Рік тому +4

    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!

  • @thegimel
    @thegimel 3 роки тому +23

    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

  • @binaprajapati3593
    @binaprajapati3593 3 роки тому +16

    I am not first.
    I am not last.
    But when Tim uploads, I click fast
    😎😎

    • @ikennamanagwu9646
      @ikennamanagwu9646 3 роки тому +2

      You should have been a rapper... Eminem needs lessons

  • @SeattleDataGuy
    @SeattleDataGuy 3 роки тому +6

    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.

  • @ajiteshkumar
    @ajiteshkumar 3 роки тому +5

    Tim is always here the same second i want to learn something. Thank you!

  • @স্বচ্ছনিরবতা

    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

  • @EnglishRain
    @EnglishRain 2 роки тому +1

    Thanks a TON for Zooming in!

  • @martinag6607
    @martinag6607 3 роки тому +6

    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 :)

  • @kenny-kvibe
    @kenny-kvibe 3 роки тому +8

    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

  • @gecsus
    @gecsus 3 роки тому +12

    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 2 роки тому +6

      def get_item(item_id: int = Path(None, description = "The ID of the item you'd like to view.", le=1)):

  • @bh3553
    @bh3553 3 роки тому +91

    Somewhere around 25 minutes, your face cam is over the relevant code. Still very informative

    • @arunavamaulik19
      @arunavamaulik19 3 роки тому +3

      @Josh Yorko This comment needs to be pinned!

    • @jalsterk
      @jalsterk Рік тому +1

      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 10 місяців тому +4

      def get_item(item_id: int = Path(description="the id of the item you want to view", gt=0) ):
      return inventory[item_id]

    • @moviemusic5158
      @moviemusic5158 7 місяців тому +1

      You can see the code in 28:18

  • @zarrycherry
    @zarrycherry 3 роки тому +95

    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 3 роки тому +4

      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 3 роки тому +2

      ya had the same problem. got kinda stuck lol.

    • @mawe4585
      @mawe4585 2 роки тому +7

      Mee too! Great video but this part around 26:00 is impossible to follow.

  • @Meenimie
    @Meenimie Рік тому

    Tim, you're the best at what you do.
    Please, keep it up because we need you.

  • @Nick-kd9no
    @Nick-kd9no 3 роки тому

    best short intro to FastAPI. Thank you Tim

  • @parameshkumar6580
    @parameshkumar6580 Рік тому

    Thank You Tim ,Great video I like the way how you used dictionary first then introduced classes

  • @joddden
    @joddden 3 роки тому

    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.

  • @softicecreamer
    @softicecreamer 3 роки тому +8

    great vid i didn't know you can do this until now... very infomative

  • @Elekks
    @Elekks 2 роки тому +4

    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.

  • @pinakastra
    @pinakastra 3 роки тому +3

    Just what I wanted to learn and that too in short n crisp (also enough detailed to get started). Thanks

  • @whichdude420
    @whichdude420 3 роки тому +2

    Glad more people are trying out FastAPI ^^

  • @procode6881
    @procode6881 3 роки тому +5

    Was waiting waiting for this ...first one to get it!

  • @yassinebenazzouz7170
    @yassinebenazzouz7170 Рік тому

    just watched your flask restful api and this one, perfect !

  • @nigeldavis
    @nigeldavis 3 роки тому

    i just started a job where im going to be using FastAPI this is perfect!

  • @kemalcihanbastak8476
    @kemalcihanbastak8476 3 роки тому +32

    Hey Tim could you make tutorials about advanced topics like Kafka and Elasticsearch with Python.
    Btw great explanation.

  • @The1neo34
    @The1neo34 Рік тому

    Thank you! Best video on APIs I have watched to date

  • @rembautimes8808
    @rembautimes8808 3 роки тому +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)

  • @Chris815
    @Chris815 2 роки тому

    Thanks

  • @iscodav
    @iscodav 3 роки тому

    Thank you very much. That was a great experience to get to start with FastAPI

  • @samozturk8276
    @samozturk8276 3 роки тому +13

    @50:51 Tim forgot to type "from fastapi import Query" on top of the code.

  • @NMNaufaldo
    @NMNaufaldo 3 роки тому

    Waw I was just amazed how fast & easy to build an API with this framework 🚀

  • @Python_in_UA
    @Python_in_UA 6 місяців тому

    Long happy days of life!
    Thanks.

  • @shnuiiwithdoublei
    @shnuiiwithdoublei 11 місяців тому +1

    Such an underrated video

  • @sanjeevKumar-eg6hp
    @sanjeevKumar-eg6hp Рік тому

    Thanks for precise and to the point explanation of FAST-API. It was nice leaning at this pace

  • @markruiz9397
    @markruiz9397 3 роки тому +1

    Please keep the FastAPI material coming!!!

  • @gnvageesh6467
    @gnvageesh6467 3 роки тому +23

    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 роки тому +1

      That would be awesome, I never used firebase, that would be nice to learn

    • @gnvageesh6467
      @gnvageesh6467 3 роки тому

      @@mike_vahemoubayed8099 yes...

  • @Robizd1
    @Robizd1 3 роки тому +21

    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 Рік тому

      do they work the same in terms of the perameters?

  • @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 :)

  • @michakacprzak8984
    @michakacprzak8984 3 роки тому +1

    Really nice introduction to FAST API, thanks Tim

  • @thehandydandy
    @thehandydandy 3 роки тому +8

    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.

  • @uptightowl3801
    @uptightowl3801 3 роки тому +3

    TIM PLEASE be my dad 😩😩😩 these tutorials are amazing. I haven’t watched it yet but I saw the channel and clicked

  • @romanviktordvorak76
    @romanviktordvorak76 2 роки тому

    Great introduction to FastAPI. Thank You!

  • @efajunk
    @efajunk 2 роки тому

    Thank you very much. Absolutely useful info about this framework!

  • @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.

  • @arturmostowiak9427
    @arturmostowiak9427 3 роки тому +3

    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.

  • @liorbm1
    @liorbm1 3 роки тому

    Its just weird to learn from someone that is under 18.. LOL
    Love your channel..

  • @EpicGamer-ux1tu
    @EpicGamer-ux1tu Рік тому

    Great vid Tim! Thanks.

  • @MansiBansalc
    @MansiBansalc 7 місяців тому

    48:17 here we can directly write inventory[item] = item and this will return the updated value

  • @mookiecodes
    @mookiecodes 3 роки тому

    This is fantastic, Tim, I needed this for my current projects

  • @Betty-dc9ky
    @Betty-dc9ky 2 роки тому

    Thank you Tim for this tutorial. Found it really useful.

  • @tcgvsocg1458
    @tcgvsocg1458 3 роки тому

    Well its time to click a like bouton on all video and...tyx a lot for all you video

  • @samozturk8276
    @samozturk8276 3 роки тому +10

    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?

  • @malachimathins9390
    @malachimathins9390 Рік тому

    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

  • @matthewrenegar6559
    @matthewrenegar6559 2 роки тому +2

    51:04 this line of code will not run because of the "Query"
    def delete_item(item_id: int = Query(..., description="The ID of the item to be deleted"), gt=0):
    At 54:00 he scrolls up and you see this at the very top of the screen.
    from fastapi import FastAPI, Path, Query

  • @riperboyxl3216
    @riperboyxl3216 Рік тому

    dude this tutorial is GREAT

  • @bjorncalbes7604
    @bjorncalbes7604 2 роки тому

    waiting on a video where you use fast api to create a project 👊

  • @rasheedibraheem6839
    @rasheedibraheem6839 2 роки тому

    A great tutorial! Very helpful, many thanks Tim

  • @eldaria
    @eldaria 3 роки тому

    Nice, this was very helpful. But as someone else also said, there were a few times that your facecam blocked what you were typing.

  • @KAREKINFPV
    @KAREKINFPV 2 роки тому

    This is incredible! Thank you so much!

  • @yessirski7868
    @yessirski7868 Рік тому

    Not sure if this will help but for 25:00 I ran into a long error when using None inside of the Path function. if you remove it and just use the description it worked for me. Love the tutorials tim!

    • @yessirski7868
      @yessirski7868 Рік тому

      this is for anyone that got confused on mac

    • @bca9329
      @bca9329 6 місяців тому

      @@yessirski7868 just googled it, it should be ... instead of None because this parameter must be given and cannot have default value

  • @lucastavares7767
    @lucastavares7767 2 роки тому

    Very Good, from Brazil 🇧🇷😃👍

  • @stefan.musarra
    @stefan.musarra 7 місяців тому

    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.💚

  • @saloniparekh3999
    @saloniparekh3999 3 роки тому +2

    wow this was really great, can you also post videos for DS and Algos to prepare for job interviews.

  • @abdallahkharoby4180
    @abdallahkharoby4180 3 роки тому

    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.

  • @mysneekers5862
    @mysneekers5862 3 роки тому

    This guy is great! Thanks for your tutorials.

  • @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.

  • @emmanouilmorfiadakis118
    @emmanouilmorfiadakis118 3 роки тому

    Very Good Explanation.Thank you

  • @Xaminn
    @Xaminn 3 роки тому

    Freddy VS JSON would truly be a horrific scene.

  • @k2theboss47
    @k2theboss47 3 роки тому +1

    Thanks Tim, this is insanely valuable!!!

  • @arrvind7385
    @arrvind7385 3 роки тому

    Tons of thanks , Really Superb explanation

  • @shashankm4363
    @shashankm4363 3 роки тому

    YES... New video from tim!!!!!!

  • @sanduchicu7545
    @sanduchicu7545 3 роки тому

    Very helpful thx a lot. gl with ur channel in the future ;)

  • @gsemerdz
    @gsemerdz Рік тому

    Great one!

  • @wakweikafelix
    @wakweikafelix 2 роки тому

    Thank you for sharing!

  • @iho2437
    @iho2437 3 роки тому

    Based Tim with the API knowledge.

  • @jeroenvermunt3372
    @jeroenvermunt3372 3 роки тому +1

    Could you do a quick little tutorial on how to connect this with a persistent database

  • @Latif127
    @Latif127 Рік тому

    It is a nice tutorial. Thank you

  • @islamh6042
    @islamh6042 Рік тому

    Thanks Tim!

  • @emilijamarjanovic5497
    @emilijamarjanovic5497 3 роки тому

    Great tutorial, thank you very much!

  • @ChrisHalden007
    @ChrisHalden007 2 роки тому

    Great video. Thanks

  • @GreenfieldOTTYS14
    @GreenfieldOTTYS14 2 роки тому

    amazing, thank you so much!

  • @michelpapi
    @michelpapi 3 роки тому +2

    I love how Canadians say “about”

  • @hackynawhat
    @hackynawhat 3 роки тому

    This was what I actually needed 😊😊😊

  • @ashraf736
    @ashraf736 2 роки тому

    Nice explanation

  • @AtulKumar-zu5hx
    @AtulKumar-zu5hx Рік тому

    great explanation

  • @johnsmyth3164
    @johnsmyth3164 2 роки тому +5

    At 26:00 def get_item(item_id:int = Path(description="The ID of the item you would like to view",gt=0,lt=2)):

  • @drewprof
    @drewprof 3 роки тому

    Good vid Tim!

  • @rahulkmail
    @rahulkmail 3 роки тому

    Excellent tutorial

  • @noobypro4560
    @noobypro4560 3 роки тому

    Thanks tim for providing this usefull contents

  • @alexnefayne4266
    @alexnefayne4266 2 роки тому

    Thanks Tim another great tutorial i find these so usefull

  • @gianniprocida3332
    @gianniprocida3332 3 роки тому

    Excellent!

  • @milesmatic2872
    @milesmatic2872 3 роки тому

    Awesome tutorial, very helpful!

  • @MansiBansalc
    @MansiBansalc 7 місяців тому

    Hi Tim! please bring a video to make DB connection in FastAPI using SQLITE. Creating multiple users, authenticating and authorizing them! would be very grateful! :)

  • @hakim6801
    @hakim6801 3 роки тому

    Great Job ..... Thanks

  • @Wonderfull_Hasti
    @Wonderfull_Hasti Рік тому

    Thank you very much for this video. Just it would be nice if you add to name of video "+Swagger_UI". As I searched a lot for that and I found that it is included in this tutorial although you did not mentioned it! :)

  • @umynchannel7528
    @umynchannel7528 3 роки тому

    thank's for providing a lot of information to us, but can you make a video on django rest api.