FastAPI Tutorial - Building RESTful APIs with Python

  Рет қаралды 232,155

Amigoscode

Amigoscode

Күн бұрын

In this Python tutorial you will learn about FastAPI, a Web framework for developing RESTful APIs in Python. FastAPI is based on Pydantic and type hints to validate, serialize, and deserialize data, and automatically auto-generate OpenAPI documents. It fully supports asynchronous programming and can run with Uvicorn and Gunicorn
#fastapi #pythontutorial #amigoscode
Don't Forget to
===========================================
💯 Subscribe to Amigoscode - bit.ly/2HpF5V8
💯 Courses Available for free here - amigoscode.com/courses
💯 Join Private Facebook Group and Discord - amigoscode.com/p/join-community
⭐ Table Of Contents ⭐
===========================================
00:00 Intro
02:15 - FastAPI and Uvicorn
04:48 - Up and Running with FastAPI
09:55 - HTTP Methods
13:45 - Async Await
16:22 - User Model
20:56 - Database
24:48 - HTTP Get Requests
28:51 - HTTP Post Requests
32:13 - Rest Client
38:41 - Swagger Docs and Redoc
44:37 - HTTP Delete Requests
49:38 - HTTP Status Codes
52:13 - Raising Exceptions
55:07 - Exercise
56:20 - Exercise Solution
01:01:24 - Outro
🙊 Here are the goods for all my videos video 🙊
► Recommended Books
===========================================
- Clean Code - amzn.to/2UGDPlX
- HTTP: The Definitive Guide - amzn.to/2JDVi8s
- Clean Architecture - amzn.to/2xOBNXW
► Computer and Monitor
===========================================
- New Apple MacBook Pro - amzn.to/3464Mmn
- Dell 27 INCH Ultrasharp U2719D Monitor - amzn.to/2xM3nW1
- Double Arm Stand Desk Mount - amzn.to/3aYKKfs
- USB C Hub Multiport Adapter - amzn.to/2Jz7NlL
► Camera Gear
=============================================
- Sony ILCE7M3B Full Frame Mirrorless Camera - amzn.to/346QIJn
- Sigma 16 mm F1.4 DC DN - amzn.to/2wbic3Q
- Sigma 33B965 30 mm F1.4 DC DC - amzn.to/39G37Fd
► IDE & Tools I use for coding 💻 🎒
===========================================
- ITerm
- VsCode
- GoLand
- IntelliJ Ultimate
- Sublime
P.S
===========================================
💯 Don't forget to subscribe | bit.ly/2HpF5V8
💯 Join Private Facebook Group and Discord - amigoscode.com/p/join-community
💯 Follow me on Instagram | bit.ly/2TSkA9w
❤️ Thanks for watching

Пікірлер: 307
@rbiyarakhmatova8607
@rbiyarakhmatova8607 2 жыл бұрын
This is the best course which explains FasApi and how to work with databases, finally, I understood a lot of things about FastApi from this video, very clear and everything worked
@ezekomaugoo5569
@ezekomaugoo5569 2 жыл бұрын
The best tutorial that I have watched. Well broken down into pieces and direct. Amazing
@eduardotrujillo9316
@eduardotrujillo9316 2 жыл бұрын
Great english, high quality video, amazing sound, and absolutely clean explanation. 10/10!
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance.
@gauravghodinde2949
@gauravghodinde2949 Жыл бұрын
Im smell chandler's defense mechanism
@olalekanjamiumakanjuola5654
@olalekanjamiumakanjuola5654 Жыл бұрын
Did you really write Great english? what has that got to do with the tutorial?
@hahadarsh
@hahadarsh Жыл бұрын
@@olalekanjamiumakanjuola5654 cause the person who wrote this comment is not an english speaker, so that was an appreciation.
@devguyahnaf
@devguyahnaf 2 жыл бұрын
Hey there, this tutorial's another banger! Great job Nelson! FastAPI is indeed an amazing framework for making REST APIs. But I'm a biased user of the Python Flask library (It's just amazing), so I hope you can make some content regarding Flask :) Regardless, thank you for making programming and frameworks easy for people. I recommend your content to a lot of my friends and people who want to learn how to code. Stay safe!
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance..
@Fadylineage
@Fadylineage 3 ай бұрын
Great Video brother. Terminal: if it didn't work using uvicorn main:app --reload use python -m uvicorn main:app --reload
@michaelraymondabikale8822
@michaelraymondabikale8822 Жыл бұрын
Even before watching, I knew there was alot to look forward in your tutorial. Great content always.
@nevetsspence7740
@nevetsspence7740 2 жыл бұрын
Absolutely great video series, very clearly and concisely communicated. Thank you very much.
@DanielSteckler
@DanielSteckler 2 жыл бұрын
My English is not very good but you speak very clearly and the truth is that it is understood very well. First time I hear someone speaking English and I understand everything. Thank you for sharing knowledge
@malkitsingh01
@malkitsingh01 Жыл бұрын
perfect video for the newbies to the framework. Subd for the production quality!
@MarcosOliveira-us4wf
@MarcosOliveira-us4wf 2 жыл бұрын
Jesus! when I have to do something and I open the KZbin, the algorithm show me the video solution the Amigoscode EVERY SINGLE MOMENT haha, You're the best!
@matthewb2133
@matthewb2133 10 ай бұрын
Such a chill relaxed tutorial. So easy to follow.
@radla9507
@radla9507 11 ай бұрын
Thank you very much for the video. It is the best introduction that I have seen. This comment is referring to to all your videos, they all are very clear and fantastically laid out. They are a wonderful resource. Great work and again thank you very much for sharing.
@boira_dani
@boira_dani 2 жыл бұрын
Amazing video! I came across FastAPI because I needed a really simple and straightforward API server for a project, and your video certainly helped! Thanks :)
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance
@RunGuitarMan
@RunGuitarMan Жыл бұрын
Very good video! Simply and clearly explained. Good job, thx!
@user-zv7yn9ly5b
@user-zv7yn9ly5b Жыл бұрын
Amazing tutorial, very clear. Thank you a lot!!!
@godswillumukoro8908
@godswillumukoro8908 8 ай бұрын
If you are getting an error with optional middle name, do this: middle_name: Optional[str] = None # Assigned a default value of None
@adedolapoogungbire7088
@adedolapoogungbire7088 2 ай бұрын
Thanks so much for this brother. Also had to redefine the roles roles: List[Roles]
@jameschong4162
@jameschong4162 Ай бұрын
This was super helpful, thank you!
@tecgeminis9926
@tecgeminis9926 2 жыл бұрын
Fantastic tutorial, waiting for the next part of this series.
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance
@mzamomahaeng268
@mzamomahaeng268 6 ай бұрын
Amazing video brother, you articulate this so well. It was a wonderful follow along. Please keep up the good work.
@KoDeCcS
@KoDeCcS 2 жыл бұрын
Had no opportunity to use side software and plugins while followed the vid so i created fron interface to test my API out. Cant wait to see what will you bring as a frontend to this one! Amazing job! Keep it going!
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 For consultation and assistance
@dragosg4258
@dragosg4258 8 ай бұрын
SUCH an excellent tutorial! Stellar work, sir. Thanks for sharing your knowledge with us and making it so easy to understand and broken into baby steps. And also, for using free resources.
@KoDeCcS
@KoDeCcS 2 жыл бұрын
Thank you for this tutorial! Its very usefull and i like how you giving the information! I wish there was a little cheatsheet document on this type of video so you can return and use this later without seeking thru whole vid :)
@sridharantce
@sridharantce Жыл бұрын
Excellent video. I could learn about FastAPI real quick.
@r0f115L4m
@r0f115L4m Жыл бұрын
Wa alaykumus Salaam brother, this tutorial was just what I needed to get started with FastAPI. Awesome stuff! Subscribed.
@Jaimefvs93
@Jaimefvs93 2 жыл бұрын
Amazing tutorial! Thanks for this top content mi amigo. I just had to subscribe
@syedmuneeb8322
@syedmuneeb8322 Жыл бұрын
Walaikum assalam. Heard the first 2 seconds and knew I had to stick around for more. May Allah bless you
@unduktea
@unduktea Жыл бұрын
Thank you so much, this video is very informative 👍 Barakallah amigoscode 🙏
@arochomsky9254
@arochomsky9254 Жыл бұрын
Great video! I will have a work interview soon and they need me to be able to use this library, I hard worked with Flask, Bottle, Django and even frameworkless, but none of the places I worked used this, so this is of greath help to begin with (I watched another ones before this tuto best till the moment)
@travel_worldwide_365
@travel_worldwide_365 2 жыл бұрын
Nicely explained. Thanks for uploading.
@nathandecena7694
@nathandecena7694 2 жыл бұрын
Hi man! This was so informative and easy to follow. Thanks 😎
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance.a
@jesuspereiraoficial
@jesuspereiraoficial 2 жыл бұрын
Great job Bro. Your video is GENIAL!!! Thanks for this...
@andersonmedina1310
@andersonmedina1310 7 ай бұрын
Fantastic tutorial You made it seem so simple.
@piotrdzwiniel2169
@piotrdzwiniel2169 2 жыл бұрын
Cool tutorial. Thank you very much for it 🙂
@hygosousa1170
@hygosousa1170 Ай бұрын
Thank you so much for you share your know knowledge of a manner so simple and directly.
@ndahayokevin7626
@ndahayokevin7626 2 жыл бұрын
Nelson, You are my all time inspiration in software development.
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance
@DaniloSilva-pl3sq
@DaniloSilva-pl3sq 2 жыл бұрын
Best FastAPI tutorial so far!
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance
@malikgaruba4079
@malikgaruba4079 2 жыл бұрын
Walaykum Salam, Detailed enough to revise. Thanks
@kiss-liava
@kiss-liava Жыл бұрын
Cool! Thank you for the tutorial
@trublaster101
@trublaster101 2 жыл бұрын
Thanks for this course.
@ElinLiu0823
@ElinLiu0823 Жыл бұрын
Already deploy fastapi in production,super love it's swagger documentation intergreted.🎉
@wp4297
@wp4297 2 жыл бұрын
Great job, so helpful. So, new subscriber
@aqibrehmanpirzada4552
@aqibrehmanpirzada4552 Жыл бұрын
Best Work Brother Masha Allah I am Glad that you made such video very helpful.
@santiagolean2088
@santiagolean2088 Жыл бұрын
You are amaizing man! Thanks
@mahmoudsamir9537
@mahmoudsamir9537 2 жыл бұрын
thank you brother for your efforts
@Khushpich
@Khushpich 2 жыл бұрын
Great video as always. Thanks amigo!
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance.
@thodorisapostolopoulos7519
@thodorisapostolopoulos7519 Жыл бұрын
Great quality of video, nice explanation both of theory and of what you implement. Good job. One question. Should i use fast API as an external api for machine learning analysis into a django app?
@arvidj8918
@arvidj8918 Жыл бұрын
23:52 haha I almost spit out my coffee when you said Alex.... Jones :D
@AE-qj5xi
@AE-qj5xi Жыл бұрын
Assalamualaikum, what a nice video. Thank you for sharing sir
@quadrolang1014
@quadrolang1014 2 жыл бұрын
thanks for this video) you help me!) thank you!
@tanjimulislam4762
@tanjimulislam4762 2 жыл бұрын
I got a Job this month as a FastAPI backend developer. Hope you will bring advanced tutorials in near future on it. There is lack of resources/courses on KZbin for advanced studies. If you could consider and make some good stuff on this framework whatever it'll be theoretical explanations, we'll be obliged there by you. 🤜🤛
@fernandocoelho1334
@fernandocoelho1334 2 жыл бұрын
Search fastapi playlist. Example: kzbin.infoplaylists
@samwelotieno9452
@samwelotieno9452 2 жыл бұрын
I did not know they could specify types in python, learnt something new ...nice
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 For consultation and assistance
@haritzmuhammad4343
@haritzmuhammad4343 5 ай бұрын
Waalaikumsalam, I've been your fan from now on, thank you for this great tutorial.
@tuobraun
@tuobraun 2 жыл бұрын
Nice video, thank you. It would be great to see how to connect this project to a real db and have a simple UI to interact.
@McMurchie
@McMurchie 2 жыл бұрын
Just starting, so far video is crisp
@makumbo22
@makumbo22 2 жыл бұрын
First comment, its a pleasure be your follower my friend.... Regards from Peru!
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 For consultation and assistance.
@LuvxJacqu4li8e
@LuvxJacqu4li8e Жыл бұрын
Nice. I was jc about how to send data on the post. Thunder Client! Got it. Very nice.
@user-hf8iy8xp9y
@user-hf8iy8xp9y 17 күн бұрын
very clear explanation with background on HTTP methods and Swagger documentation. One additional helpful topic would have been query string parameters.
@nagdali9209
@nagdali9209 2 жыл бұрын
Salam brother This is extremely insightful content
@LaunchpadMediaGroup1
@LaunchpadMediaGroup1 2 жыл бұрын
Awesome video - I am hoping the Alex Jones reference was on purpose 😂
@ceno9197
@ceno9197 11 ай бұрын
Perfect course brother.
@BbB-vr9uh
@BbB-vr9uh Жыл бұрын
Thank you for this great tutorial! Just one question: I am wondering why not start using pipenv for future tutorials as it it considered a best practice at this point?
@azzahamed2063
@azzahamed2063 2 жыл бұрын
Thank you !
@noirsgames
@noirsgames 2 жыл бұрын
Mashallah, you explained it so clean.
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance
@Fosdark
@Fosdark 3 ай бұрын
Thank for video!
@hamzanasirr
@hamzanasirr 2 жыл бұрын
Nelson, you beauty. Stay blessed brother. Jazak ALLAH!
@sf2998
@sf2998 Жыл бұрын
hey great tutorial!!
@ahmadumar6210
@ahmadumar6210 2 жыл бұрын
jazakaAllahu khairan its very very useful!
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance
@sascha.
@sascha. Жыл бұрын
Great video!
@DennisPing
@DennisPing 2 жыл бұрын
THIS IS THE ONE!! Thanks
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance
@madukomablessed4712
@madukomablessed4712 Жыл бұрын
Wonderful tutorial! Please which extension you use in vscode to do the auto import for you?
@abessesmahi4888
@abessesmahi4888 2 жыл бұрын
و عليكم السلام ما شاء الله لا قوة إلا بالله بارك الله فيك Thank you so much brother
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 For consultation and assistance.
@robertocorti4859
@robertocorti4859 Жыл бұрын
great tutorial! Thank you so much Amigo!
@trocandobytes
@trocandobytes 7 ай бұрын
You´re amazing !
@lioneluran
@lioneluran 2 жыл бұрын
Great resource! Have you used a Prometheus client to monitor your FastAPI app? I've been trying to but it's beyond my understanding, apparently. Any resource you'd suggest? Thanks!
@aliemamalinezhad6523
@aliemamalinezhad6523 2 жыл бұрын
fast api is amazing, thanks
@abdulrahmanali599
@abdulrahmanali599 2 жыл бұрын
Wow Wow Wow! I have a habit of skimming through coding videos and I certainly learned a new thing today!!!! Just felt like sharing, I had a school project where I had to use Spring boot & React. I watched amigoscode videos about these stacks and I scored a 90+ in my software engineering project. My supervisor commented "This is a commercial ready product!".
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance..
@ElkoGuitarist
@ElkoGuitarist 2 жыл бұрын
Thank you brother 👏🏼
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance..
@michelchaghoury870
@michelchaghoury870 2 жыл бұрын
great vid we need more and more content like this one, can you make a vid about how to use swagger with spring boot ?
@dlouise64
@dlouise64 3 ай бұрын
Thank you :)
@RichardvanBemmelen
@RichardvanBemmelen 2 жыл бұрын
This is excellent!
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ Thanks For consultation and assistance
@mariachioteli3975
@mariachioteli3975 2 жыл бұрын
Hello, I have a question. When I am using the PUT method to update Jamila ( last video_excerice) , it updates everything rather than the role. I add the "admin" but it still shows only "student" when I execute the GET. Do you have any idea why it might happens? Thank you in advance!!
@techy5393
@techy5393 2 жыл бұрын
very usefull tutorial i love you very much ! ❤
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 For consultation and assistance
@alw-3052
@alw-3052 Жыл бұрын
WELL DONE!!!
@hamedahmad1
@hamedahmad1 Жыл бұрын
Thanks!
@MehmetALTINEL
@MehmetALTINEL Жыл бұрын
Aleykumsalam verahmetullahi veberaketu. Thank you for your teaching our brain and touching our hearth.
@sirojbobojonov4617
@sirojbobojonov4617 2 жыл бұрын
Assalamu Alaykum bro , very amazing tutorial
@najafzawar4852
@najafzawar4852 9 ай бұрын
Love the way you say Salam😍
@tiagocosta2689
@tiagocosta2689 10 ай бұрын
escelent video. Congracts! If possible, make a video showing how to deploy one rest api. Thanks a lot
@katlegolionel1174
@katlegolionel1174 Жыл бұрын
Yo Bro, what an amazing tutorial...thank you so much for this. I now understand how APIs more than I did before watching this. Quick question, how would one go about deploying an API created using FastAPI !and have it available publicly for people to use on RapidAPI? Look forward to your response. Best regards
@josemariadiy6400
@josemariadiy6400 Жыл бұрын
Hola,🖐️ Al 2022 que framework me recomiendas usar en el ecosistema Python..... Django, Flask o FastApi ?? 🤔🤔🤔🤔 O cada uno de estos tiene usos diferentes?. Saludos
@aktanbekaidarov3470
@aktanbekaidarov3470 Жыл бұрын
Thanks for the video! Where are the links regarding Postgresql and integrating db with FastAPI (you mentioned in end of video)?
@RayronRodffer
@RayronRodffer 2 жыл бұрын
Nice tutorial! send a Hello to brazil, please!!
@user-jz5tx5kd3p
@user-jz5tx5kd3p Жыл бұрын
Hello, i'm student, i have applied a company, i recieve a misstion " Built backend mobile app by phython ", done. So i'm here, before watching video, i want to mark this time. =)). so interesting
@rolandovillcaarias5112
@rolandovillcaarias5112 2 жыл бұрын
Thank you for that amigo 🤓
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance..
@dalicodes
@dalicodes 2 жыл бұрын
Thank you. This is very informative. I am working on my next project for the next video where I create an api for crypto currencies scraped from the web and this has greatly helped in understanding fastapi. How do I interact with postgres?
@lordmelbury7174
@lordmelbury7174 2 жыл бұрын
Great tutorial, subscribed! ps. Maybe leave out the facebook signup prompts though as many people don't do facebook..some even dislike it !
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 For consultation and assistance
@kingramius5089
@kingramius5089 2 жыл бұрын
Just great 👍!
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance.
@millerdane
@millerdane 2 жыл бұрын
Thanks for posting bro.
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance
@oussamachahidi9201
@oussamachahidi9201 Жыл бұрын
That was Greate my dear brother ! Can u do a tutorial about FastApi-users.
@anindasadman443
@anindasadman443 4 ай бұрын
which font do you use? seems very clean.
@alexanderkomanov4151
@alexanderkomanov4151 10 ай бұрын
Great One! I'm wondering how it was working in your case! Because an Optional type requires at least a None value. In order to make it optional - we need to provide a default parameter: middle_name: Optional[str] = None Otherwise, it will trigger an error: Field required [type=missing, input_value={'id': UUID('c7866691-65a...[]}, input_type=dict]
@aidenyang747
@aidenyang747 9 ай бұрын
same happened to me, thanks for the input
REST API Crash Course - Introduction + Full Python API Tutorial
51:57
Why You NEED To Learn FastAPI | Hands On Project
21:15
Travis Media
Рет қаралды 152 М.
아이스크림으로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 50 МЛН
Who has won ?? 😀 #shortvideo #lizzyisaeva
00:24
Lizzy Isaeva
Рет қаралды 34 МЛН
Python FastAPI Tutorial: Build a REST API in 15 Minutes
15:16
Java Data Structures Tutorial
1:39:50
Amigoscode
Рет қаралды 325 М.
Quickly Authenticate Users with FastAPI and Token Authentication
46:05
Akamai Developer
Рет қаралды 97 М.
How to Use FastAPI: A Detailed Python Tutorial
20:38
ArjanCodes
Рет қаралды 218 М.
FastAPI, Flask or Django - Which Should You Use?
9:49
Tech With Tim
Рет қаралды 53 М.
Python FAST API Tutorial
58:20
Tech With Tim
Рет қаралды 321 М.
5 Good Python Habits
17:35
Indently
Рет қаралды 418 М.
Pydantic Tutorial • Solving Python's Biggest Problem
11:07
pixegami
Рет қаралды 248 М.
APIs for Beginners 2023 - How to use an API (Full Course / Tutorial)
3:07:07
freeCodeCamp.org
Рет қаралды 1,8 МЛН
OZON РАЗБИЛИ 3 КОМПЬЮТЕРА
0:57
Кинг Комп Shorts
Рет қаралды 1,5 МЛН
Хотела заскамить на Айфон!😱📱(@gertieinar)
0:21
Взрывная История
Рет қаралды 6 МЛН
Как правильно выключать звук на телефоне?
0:17
Люди.Идеи, общественная организация
Рет қаралды 483 М.