Why You NEED To Learn FastAPI | Hands On Project

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

КОМЕНТАРІ • 171

  • @Tommy2Toness
    @Tommy2Toness 26 днів тому +6

    This is how all intro tutorials should be. Fundamental justification, the most basic components and how they are naturally useful, and also a quick peak at where to find more documentation for if you decide to deploy at scale. Thank you, subbed.

  • @hndr91
    @hndr91 Рік тому +26

    Mann, this video is crystal clear intro to FastAPI

  • @aitools24
    @aitools24 Рік тому +18

    00:03 Creating an API first allows for easy integration and maintenance of multiple applications.
    02:30 Fast API is a better alternative than Flask as an API.
    05:20 FastAPI provides built-in async support and is more efficient than Flask
    07:57 Create and validate a to-do item for the API
    10:44 Fast API provides typed APIs, allowing for easy declaration of types in Python.
    13:29 Implementing CRUD Operations
    16:14 Updating to-do items
    18:46 Fast API provides a built-in Swagger UI for easy API documentation and testing.
    Crafted by Merlin AI.

  • @milunacodes
    @milunacodes Рік тому +62

    I knew FastAPI was good but it is actually great! Much more production ready than Flask and much closer to Spring framework

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

      What do all those weird terms mean?

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

      @@keylanoslokj1806 Flask is another Python library and Spring is a Java framework

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

      ​@@keylanoslokj1806they represent different ways of doing things.

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

      What makes it closer to Spring in your view @miluna94 ? - interested to know as I am looking into python frameworks and wish to pick something which may make it simpler in terms of congnitive load and context switching . Thanks

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

      ​@@danielkirsch4351I would say the autoconfigured validation, swagger and all those sweet things that Flask does not have out of the box

  • @incognito_789
    @incognito_789 9 місяців тому +1

    I'm sort of a newbie so it takes me some hours to follow up, but your video is incredibly concisely and informative. Thumbs up for you, thank you soooo much!!!

  • @ratzule
    @ratzule 9 місяців тому +2

    Outstanding, Travis. Crystal clear and fun. This is the first of your videos I have found, but I enjoyed and learned so much useful stuff in it I immediately subscribed.

  • @terribletruth8201
    @terribletruth8201 Рік тому +9

    11:25 If you're dumb or blind like me, make sure the menu item next to GraphQL is set to "JSON". Mine was defaulted to text, it took me forever to figure out why mine wasn't working.

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

      you saved me from insanity with this comment, thanks!

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

    Coming from Rails world, fast and right to the point! love it, smooth teaching style!

  • @_MagL
    @_MagL Рік тому +5

    At 16:42 line 32 just updating the Todo item would suffice since the Todo id isn't expected to change

  • @rafaelnegreiros_analyst
    @rafaelnegreiros_analyst 5 місяців тому +1

    Great video. Thank you for that.
    I'm starting to develop in Python, using Flet. This library has integration with fastapi by the package flet-fastapi. I'm creating a page that will have a set of forms. So I will use flet-fastapi to handle the routes , but seeing your video it seems now to me that Fastapi is useful to create API's, a way to manipulate data in a DB

  • @whisperingadventurespnw
    @whisperingadventurespnw Рік тому +8

    Could you do a follow up on this video using a database? I’ve seen fast api tutorials like this before but they all stop before they implement the database layer. If you made that video you’d be the only one with that content.

  • @jonathanjohnson2785
    @jonathanjohnson2785 Рік тому +15

    Great content as usual. Im more a javascript guy but it doesn't hurt to see things from a python's perspective💯👍👍

  • @Patronesofly
    @Patronesofly 9 місяців тому

    Definitely like how enthusiastic he is about everything

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

    Amazing ! This video got me started very FAST, thank you very much!

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

    Love the video! Where are the next parts?

  • @zbyszeks3657
    @zbyszeks3657 9 місяців тому

    6:46 "ERROR: Error loading ASGI app. Attribute "app" not found in module "main".
    Just didn't "save" on the file and there was not autosave mode on

  • @pawjast
    @pawjast 4 місяці тому

    That was a great demo of fastAPI. Really cool library!

  • @wei7360
    @wei7360 12 днів тому +1

    i cannot click on the link for pt2 and pt3. says website is down. is there a way to watch p2 and p3?

  • @hellomelloyello
    @hellomelloyello 10 місяців тому +1

    Excellent tutorial. I did a Coursera Cert on Back-End using Django and was entirely overwhelmed! Lol. This clarified a lot for me.

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

    awesome.. I worked with flask apis .. it pretty much looked the same.. with built in async etc.. thank you.

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

    Great tutorial, nice way to spend my Sunday morning!

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

    Caught me a bit off guard that you kept calling it FastTrack and then got the count off, but forget that this video was great!!! Thanks Travis.

  • @ragsbigfella
    @ragsbigfella Рік тому +3

    Travis, thank you for this video. Can you please create a video with async/await in fastapi with a bigger project which has a multiple folders/files?

  • @zatchbell8112
    @zatchbell8112 21 годину тому

    hello, where can i find the other parts?

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

    a very clear video with good example(s) of why one might use FastAPI...

  •  Рік тому +1

    nice video. how do you compare it with something like Ruby-Sinatra or Hanami ?

  • @timbrap4693
    @timbrap4693 Рік тому +5

    You mention when building a webapp, you can use a frontend like react to call the routes. When you do this, the calls are visible from the network tab in devtools. But when I visit some of the more famous websites, those calls arent always visible. Why is that? Do they not use an API, or do they serverside render it (prefetch serverside and send the data over some way)

    • @Crypt0mite
      @Crypt0mite Рік тому +3

      This is a good question I would like to know this as well.

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

      Most big companies have an active socket connection for transferring data between the backend and frontend. So what you see most times is just interaction between the frontend and the socket service

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

      @@AdefemiGreat Do you happen to have by any chance some literature about this topic?

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

      @@timbrap4693 not literature really, more like experience

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

      They're probably using next or nuxt to make server side requests

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

    I'm asking about fastapi being typed (I am talking about developer experience). As I have worked with c#. The typed characteristic is what I admire the most about it. Python being a dynamic language, how can fastapi be typed while running on python?
    Is it compile time typed or is it run time typed too?

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

    This is a very good video. Congrats. Pitty it didn't cover the authentication and how to enhance the swagger docs. Maybe a more in depth video later, hmm? What do you think?

  • @Darbokst
    @Darbokst 11 місяців тому

    went to join your community for vid 2 and 3, hopefully it'll be back soon.

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

    Great, to the point, tutorial. Thank you.

  • @istwishmeister9368
    @istwishmeister9368 8 місяців тому

    does anyone know why the FastAPI document in this video is shown differently than the currently available version?
    How can I get the proper documentation version of FastAPI?

  • @kasir-barati
    @kasir-barati 6 місяців тому

    But I thought that typing is something was added in Python v3. So could it be really an advantages over Flask?
    BTW how about something like dJango?

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

    how to flash message to jinja2 template using fastapi just like flash in flask?

  • @mawkuri5496
    @mawkuri5496 3 місяці тому

    can you make a tutorial using flet as a frontend and fast api as a backend.

  • @chriskeo392
    @chriskeo392 Рік тому +7

    Need a video with fastapi + htmx

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

      Expect it soon. Been looking for a reason to use htmx.

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

      @@TravisMedia I'll be on alert for the video

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

    Great! How do you have the autocompletion in your terminal? Is it a plug-in or a special terminal

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

      Im not sure about Travis, but I use zsh as my shell and use the zsh-autosuggestions zsh-syntax-highlighting plugins

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

    Wonderfully done. Thank you

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

    How about this vs Quart?

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

    Though dated, I'm so used to Yii2 and Gii for automatically generating MVC from a database. There doesn't seem to be anything equivalent in the Python world for now, that is free. Or is there...?

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

      django

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

      @@BrendanAus I wonder how Django compares with Yii2, as a pure REST API backend...

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

    I've got a database on a digital ocean droplet that I'm trying to connect to with FastAPI and SQLModel. I can connect to the DB when it's local. Do you have any tutorials on getting things up on the cloud? Thanks.

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

      So a database installed and running on a droplet that you manage, or a managed database that DO manages? Just wanted to clarify.

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

      It's a database on a droplet that I manage. I've made some progress: I've got FastAPI/SQLModel on a Deta space. I'm getting a {"detail":"Not Found"}, and in the Swagger docs I'm getting a 200 Successful response and then a 422 Validation Error.
      From my research, it looks like everything is good on the server side of things and that there's something wrong with my code - either the ORM or the API.
      Is that accurate?

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

    Buen video, ¿como haces para hacer post, get, put y delete sin estar en docs? veo que lo haces seleccionando de unos desplegables pero a mi no me aparece así

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

      “Cuando uses la documentación, verás @app.get() en los ejemplos o @app.post() en los ejemplos. Así que cuando mires en la página de Parámetros de Ruta en la documentación, verás solicitudes get. Cuando mires en la página de Cuerpo de Solicitud, probablemente encontrarás ejemplos de solicitudes post, y así sucesivamente. ¿Responde eso a tu pregunta?”

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

      @@TravisMedia ¡Gracias!

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

      ¡Ya creo que lo ví! ¿estas usando postman para probar los endpoints?

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

    Bravo 👏👏👏 Master
    Lit 🔥 Impressive 😍
    Gratitude 🙏 for your satisfactory Work 🚀🌟🌱

  • @Bangs_Theory
    @Bangs_Theory Рік тому +5

    Question: Why do you create a new project and environment using a terminal program outside of VS Code when you're going to end up using vs-code to build out your app? Please someone answer this question, I noticed many people do this.

    • @TravisMedia
      @TravisMedia  Рік тому +22

      Two reasons for me:
      1. I by default just start with the terminal by habit when I do things like this.
      2. If you start with VSCode, often when you bootstrap a project it creates a new folder. Then you have to cd into that and reopen VSCode to show the file tree from that folder. If you start with the terminal, you can install, cd into a directory, and get into the path where you need to be, and then at last open up a text editor in that path.

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

      I used to use the terminal to go to the project directory and start vscode with code .
      Now I use neovim instead of vscode. I like the terminal because it gives easy access to many programs / functionalities.

  • @MrProgrammerSharmaJi
    @MrProgrammerSharmaJi 11 місяців тому

    🥺🥺 now python can be my primary goto for small and medium projects as it resolves my concern of oversized setup of anything like django... Also it made easy to structure our project by ourselves.

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

    love working with fast api

  • @zbyszeks3657
    @zbyszeks3657 9 місяців тому

    4:05 source venv/bin/activate?
    if ms win? maybe: venv\Scripts\activate

  • @daze8410
    @daze8410 2 місяці тому

    I love fastapi because I love flask and it's basically the same syntax but with more features

  • @werghiaziz2943
    @werghiaziz2943 6 місяців тому +1

    i create project for remove background image ,and enhance quality and extract text from image using fastapi with python and front using htmx

  • @jironymojirolamus913
    @jironymojirolamus913 11 місяців тому

    Great turorial, thanks!

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

    Awesome tutorial! Thanks!

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

    Thank you for your efforts! Respect

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

    Man loved your content , Thankyou

  • @dev.info.2000
    @dev.info.2000 Рік тому

    Which version of python should be used for fastapi?

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

    Any recommendations for older tech guy getting into development starting from scratch…?

    • @SergioBallestrero
      @SergioBallestrero Рік тому +3

      It depends a lot on your background and your goal (personal or career move). But anyway what I feel is most important is to be motivated and enjoy doing it, so find some hobby project to experiment, like automating some task, some home IoT with RasPi, Arduino etc. The second one is to read not just books but other people's code too.

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

      Age doesn't matter. The intent to learn is

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

      I recommend not being fooled into thinking age is a factor for learning skills. When you're new, you're new. :) Better question to ask would be "with my background in this and interests in this, where do you recommend I start"

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

    Hi. I want to build a web application. I know coding in python and javascript. But that's all. I don't know anything about web applications, HTML, CSS, frontend, backend, routing, HTTP, databases, servers, protocols etc. So, how can I learn about these things and how do I build a web application? Could you please recommend a book explaining all these things for a complete beginner? Thanks.

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

      Dude just ask ChatGPT those exact same things.

    • @david_chuka
      @david_chuka 4 місяці тому +1

      hey James, I'd say you already have the basics down i.e you know what it takes to build a web application. It'll really help if you have a project idea in mind to motivate you to build something entirely from scratch. If not, taking a course might be a better first step before you read a book because this way you get to internalize a lot of fairly new concepts visually. Please check out courses on Udemy or Scrimba for affordable courses. If you want something free, NetNinja/Traversy media is a great place to start. Goodluck!

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

    Is there a good tutorial about authentication ?

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

    Thank you. I enjoyed this.

  • @sameergaikwad222
    @sameergaikwad222 10 місяців тому

    Awesome. Thanks it helped. 👍👍

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

    how to we structure our project when it gets bigger.

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

    Did he talk about FastAPI minuses? There got to at least one?

  • @God-uf6yc
    @God-uf6yc Рік тому

    Bottle is good too?

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

    is it feasible for ML apps?

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

    You my friend are simply Awesome!! Now I know Fastapi... thanx!

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

    Built in swagger is cool. This Definitely seems more intuitive than JavaScript

  • @theBidon
    @theBidon Рік тому +3

    100k incoming!

  • @christofferagger4072
    @christofferagger4072 11 місяців тому

    Great vid!

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

    I did but no one has taken my crud operations seriously

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

    Since I'll be concentrating on HTML/CSS a Web API is something I'll need to add to my curriculum.
    Question: Do you still recommend Zoho Books?

  • @not_a_human_being
    @not_a_human_being 11 місяців тому

    put? delete? looks like FastAPI puts new wind into the sails of the REST. Having worked with APIs I'm yet to see anything other than "GET" or "POST" in production.

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

    This video is the bestttttttt

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

    How do i host it remotely

  • @baloney_sandwich
    @baloney_sandwich 10 місяців тому

    No corporate developers use vscode. There’s so much work to do and so much integration but vscode is just a skeleton program and all companies disable vscode market place.

  • @joyavila6254
    @joyavila6254 11 місяців тому

    I tried to follow your tutorial, however I got this error "$ uvicorn main:app --reload
    bash: uvicorn: command not found" . What did I missed?

  • @bakasenpaidesu
    @bakasenpaidesu Рік тому +5

    Django 🔥

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

    Can you please add a link to the code that you're writing, I know you want us to 'code along with you' but it's difficult to find syntax errors as we're watching a video. It's especially insensitive to those with accessibility needs. Good video otherwise though!

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

    wow.. i need to rewrite my flask api. like right now

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

    FYI whomever is reading:
    There's a Postman extension in VScode

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

    Can I edit your videos?

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

    Thank you so mach!

  • @orlanino
    @orlanino День тому

    The genius... link is not working.

  • @azmisudrajat
    @azmisudrajat 19 днів тому

    the hard part to leaving django is its django admin feature

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

    Learning something like msgspec also pays off

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

    except mvc is a mistake - cqrs seems to be the future and also improved minimal APIs

  • @Jazz_FunkBass
    @Jazz_FunkBass 6 днів тому +1

    Nah, Tornado everytime!

  • @pramudyadika_
    @pramudyadika_ 10 місяців тому

    Thanks!

  • @LawalHussein
    @LawalHussein 4 місяці тому

    But when learning fastapi u need to create things manually

  • @LawalHussein
    @LawalHussein 4 місяці тому

    Django to go💯

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

    Thats alot todo in one day ;)

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

    Why this dude accent sound like he from Arkansas and England? 😂😂😂

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

      😂😂😂 I think you nailed it. I get asked all the time, and I'm like "Umm I'm from Virginia.?" But most people guess either the south US or England. England though, really? The other two I get are that I'm from NY (??? what) and of course, I have a hundred comments on YT saying I sound like Obama. Whatever it is, you all keep me laughing about it.

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

    Coming from Laravel this seems so painful to watch. No model route binding
    Don't mind me 😅 I'm a noob with only six months of experience
    The swagger thing was neat 😎

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

    hey loki

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

    i feel that using the command prompt is a large step backwards. i had to stop right there.

  • @HamidBehnam
    @HamidBehnam 26 днів тому +1

    UA-cam should stop paying for videos like this. What's the point? Most of these are just copy-paste content straight from the official documentation.

    • @TravisMedia
      @TravisMedia  26 днів тому

      Take a look at the comments. This video has really helped thousands. Can’t say that about all my videos but this one I can. Also, teaching from the documentation is the most effective away to learn. Many devs don’t use the docs. I’m trying to get them to primarily use docs for everything.

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

    travis you got a lil twang in your voice lol. You grew up in the south lmao?

  • @designgoat2023
    @designgoat2023 5 місяців тому

    Did you kill The Flash's parents?

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

    Socketify

  • @anonymous_anonymity
    @anonymous_anonymity Рік тому +34

    Why we need to learn? No we do not need to learn.

    • @i_clock4783
      @i_clock4783 Рік тому +9

      Bro if you want you can learn it it's not required that you learn it

    • @HypnosisBear
      @HypnosisBear Рік тому +18

      That's your EGO speaking there buddy. If you don't wanna learn you can happily leave. Nobody's forcing you.

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

      What rebels!

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

      Loving it good comment :p

    • @Action2me
      @Action2me Рік тому +3

      It’s not literal. The “NEED” is for emphasis.

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

    Anything python is an immediate no from me. Python is just a trend and the language has nothing good going for it.

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

      chatgpt written in python

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

    maaaan
    I know it's the lesson for dummies, but cmon, don't teach them bad things from start, ```for todo in todos```? rly? If your subs started with fastapi they should know about dicts...right???

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

      he goes on to explain that you would replace the array with a database - point was to create endpoints