How To Create a Python API With FastAPI - Full Tutorial

Поделиться
HTML-код
  • Опубликовано: 19 июн 2024
  • Host your API with Hostinger by going to: hostinger.com/TechwithTim and using my code TECHWITHTIM
    In today's video I'm going to be showing you guys how you can create your own API using Python for web applications. API (application programming interface) essentially allows one piece of software to request data from another and receive a response.
    If you want to land a developer job: techwithtim.net/dev
    🎞 Video Resources 🎞
    How to host this FastAPI: fastapi.tiangolo.com/vi/deplo...
    Finished Code: github.com/techwithtim/Fast-A...
    Fix Pip (MacOS): • How to Install Pygame ...
    Fix Pip (Windows): • How to Install Pygame ...
    ⏳ Timestamps ⏳
    00:00 | What is an API?
    00:40 | CRUD
    01:19 | Request/Response
    01:38 | JSON
    04:15 | FastAPI Overview
    04:44 | Install/Setup
    05:35 | Running FastAPI
    09:00 | Pydantic Models
    12:02 | Post Request
    13:39 | Get Requests
    15:57 | Path Parameters
    17:45 | Put Requests
    20:30 | Delete Requests
    22:10 | Testing the API
    23:41 | Small Fix To Delete Request
    Hashtags
    #api #pythonprogramming #techwithtim

Комментарии • 47

  • @iSteadyTech
    @iSteadyTech 28 дней назад +16

    To anyone seeing this comment, Just know you are capable of making it it's all on what you tell and teach yourself

  • @KayderimGameplays
    @KayderimGameplays 28 дней назад

    Thanks tim, i was having trouble with with this API thing, turned out much simpler than what i expected

  • @PythonDeveloper98
    @PythonDeveloper98 28 дней назад +2

    Thankyou so much for video, Love from India❤❤❤

  • @GeorgAubele
    @GeorgAubele 24 дня назад +1

    Great tutorial - thanks a lot!

  • @utrodus
    @utrodus 27 дней назад +1

    Thanks tim 🎉 you’re the best 😊

  • @SandyLearner
    @SandyLearner 28 дней назад +4

    Hi @Tim,
    Very much appreciated for putting such Project based videos on Python. A earnest Request can you post Python Automation for DevOps Automation with Microservice Dev. It's very rare in RUclips to see such videos . Usage of adv 3rd party modules , Virtual Env for Task Automation 🎉🎉

  • @user-ts9ks8in2n
    @user-ts9ks8in2n 28 дней назад +1

    Thank you Tim

  • @usamashami11
    @usamashami11 27 дней назад +1

    Much needed 🥺

  • @softwareengineer8923
    @softwareengineer8923 12 часов назад

    Awesome tutorial, always a pleasure to enhance coding skills by watching your videos.

  • @faru2301
    @faru2301 28 дней назад +23

    Love from kerala 🌴🌴🌴🌴🌴🌴

  • @Sarvesh_Ganesan
    @Sarvesh_Ganesan 28 дней назад +1

    Hey Tim. Nice video! Is it possible for you to make a video on how to build agent frameworks from scratch using python?

  • @IOSARBX
    @IOSARBX 28 дней назад

    Tech With Tim, Subscribed because your videos are always awesome!

  • @matiasbarrera6959
    @matiasbarrera6959 28 дней назад

    Hi! Nice video!! Where do you recommend deploying a fastapi serverless? I tried vercel but its not very python friendly yet apparently. Thanks!! 😄

  • @sathishKumar-wb6sl
    @sathishKumar-wb6sl 23 дня назад +1

    Big thanks and much love from India. Please add JWT authentication to this code and upload part 2 of the same.

  • @tameemalkhliefat3036
    @tameemalkhliefat3036 27 дней назад

    Hi Tim this was an amazing video , is it possible to have some go-lang videos in the future ? you have a talent for teaching and i would love to learn more about go from you

  • @valenciawalker6498
    @valenciawalker6498 28 дней назад

    thanks

  • @RishavKundu
    @RishavKundu 27 дней назад

    great video.
    just to note,
    imo you never want to set a root pass for your deployment. always always setup keys initially!!
    it'll save you the trouble down the line :)

  • @disispeter
    @disispeter 20 дней назад

    hey Tim just checking in for issues im having on my end as a new programmer learning python...I had fastapi imported and unicorn imported awhile ago following one of ur old videos, but apparently I was having trouble in the editor claiming module could not be found... so I spend 3 days learning how to properly setup a folder to organize files and learned how to setup venv and how to properly activate it just for ip link not to work in my browser...I haven't gotten past the 8:08 mark yet..I get it im a beginner and dont know how to setup everything up from scratch but im still trying

  • @adarmawan117
    @adarmawan117 28 дней назад

    Hi, Tim
    Can you please make a video how to up this project online,?
    Thankss

  • @ayushshende4290
    @ayushshende4290 24 дня назад

    what db solution do you suggest using with fastapi, the docs have sqlAlchemy but they are suggesting to move to sqlmodel, if you can, please make a video integrating db as well.

  • @basomiddin
    @basomiddin 27 дней назад

    Of course nice tutorial. However everyone would like to get information about templating like flask. Tim, I know you can make that kind of tutorials as well for your subscribers)))

  • @ImAbuzarr
    @ImAbuzarr 28 дней назад +2

    Please create FastAPI complete tutorial

  • @doggo104
    @doggo104 27 дней назад

    Need the rest of the Rust series

  • @BorisHrzenjak
    @BorisHrzenjak 28 дней назад +1

    Hostinger is on the move :) I see them sponsoring almost all tech youtubers that I watch these days :D

  • @Anonymous-dy2te
    @Anonymous-dy2te 28 дней назад +1

    I finished the API, but instead of using an in-memory implementation, If you used any database. It's even a good project.

  • @timjames4306
    @timjames4306 28 дней назад +4

    Please make a video on Django Rest Framework tutorial😊

    • @jigsaw2253
      @jigsaw2253 28 дней назад +1

      There are in the channel

  • @aogunnaike
    @aogunnaike 28 дней назад

    Can authentication still be added?

  • @oblivion7300
    @oblivion7300 26 дней назад

    Is this an alternative to restful api? What ive

  • @anonmyous.....
    @anonmyous..... 28 дней назад

    58 minute ago legit!

  • @happydays334
    @happydays334 27 дней назад

    Hey can you please make some NEAT implementation in python with pygame like a full series as many people are interested in machine learning

  • @AjaySingh-xy9zq
    @AjaySingh-xy9zq 28 дней назад

    One video for how to deploy fast api

  • @enriquebruzual1702
    @enriquebruzual1702 27 дней назад

    @19:43 "The method 'dict' in Class 'BaseModel' is depricated, use model.dump" = update_task = task.copy(update=task_update.model_dump(exclude_unset=True)) (pydantic: 2.7.1)

  • @francoisschoeman5350
    @francoisschoeman5350 28 дней назад +1

    No database integration, auth, security, best practices, headers, form data, middleware, CORS, testing, project splitting or deployment.
    Nice video, but if you are including "Full Tutorial" in your title, make sure it's a full tutorial. 😊

  • @IjazAhmad-wv9qx
    @IjazAhmad-wv9qx 12 дней назад

    Please share code also

  • @therealbfg123
    @therealbfg123 28 дней назад

    Me and Linode watching you cheat on us so easily 😢.
    Love your vids.

  • @ALGCoders
    @ALGCoders 28 дней назад

    🙂

  • @dev-akeel
    @dev-akeel 28 дней назад +1

    When will you complete creating these beginners tutorials? 😢😢
    Can't we expect any little advanced level project/ content?

  • @shafiullahptm909
    @shafiullahptm909 28 дней назад

    Bro i challenge you to make a 3d game using ursina 😂 will you accept me😅

  • @dijei_fullfine
    @dijei_fullfine 28 дней назад +2

    Are u serious men?? I know how to use fastapi and I just did a quick overview, but why you don't have autocomplete for fastapi?? And python 3.9? C'mon Tim, I assume that you are busy but seeing how you have to type and guess HTTPException made me feel nervous

  • @putuadibrata
    @putuadibrata 28 дней назад

    first bro, pin me. pls