No video

FastAPI Tutorial - Building RESTful APIs with Python

  Рет қаралды 237,335

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...
💯 Join Private Facebook Group and Discord - amigoscode.com...
⭐ 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...
💯 Follow me on Instagram | bit.ly/2TSkA9w
❤️ Thanks for watching

Пікірлер: 311
@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
@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 2 жыл бұрын
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.
@Fadylineage
@Fadylineage 4 ай бұрын
Great Video brother. Terminal: if it didn't work using uvicorn main:app --reload use python -m uvicorn main:app --reload
@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
@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..
@godswillumukoro8908
@godswillumukoro8908 9 ай бұрын
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 3 ай бұрын
Thanks so much for this brother. Also had to redefine the roles roles: List[Roles]
@jameschong4162
@jameschong4162 2 ай бұрын
This was super helpful, 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 KZfaq 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: kzfaq.infoplaylists
@ezekomaugoo5569
@ezekomaugoo5569 2 жыл бұрын
The best tutorial that I have watched. Well broken down into pieces and direct. Amazing
@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
@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..
@michaelraymondabikale8822
@michaelraymondabikale8822 Жыл бұрын
Even before watching, I knew there was alot to look forward in your tutorial. Great content always.
@MarcosOliveira-us4wf
@MarcosOliveira-us4wf 2 жыл бұрын
Jesus! when I have to do something and I open the KZfaq, the algorithm show me the video solution the Amigoscode EVERY SINGLE MOMENT haha, You're the best!
@radla9507
@radla9507 Жыл бұрын
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.
@nevetsspence7740
@nevetsspence7740 2 жыл бұрын
Absolutely great video series, very clearly and concisely communicated. Thank you very much.
@user-hf8iy8xp9y
@user-hf8iy8xp9y Ай бұрын
very clear explanation with background on HTTP methods and Swagger documentation. One additional helpful topic would have been query string parameters.
@abessesmahi4888
@abessesmahi4888 2 жыл бұрын
و عليكم السلام ما شاء الله لا قوة إلا بالله بارك الله فيك Thank you so much brother
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 For consultation and assistance.
@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.
@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 :)
@alexanderkomanov4151
@alexanderkomanov4151 11 ай бұрын
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 10 ай бұрын
same happened to me, thanks for the input
@syedmuneeb8322
@syedmuneeb8322 Жыл бұрын
Walaikum assalam. Heard the first 2 seconds and knew I had to stick around for more. May Allah bless you
@AE-qj5xi
@AE-qj5xi Жыл бұрын
Assalamualaikum, what a nice video. Thank you for sharing sir
@Ukkashatu
@Ukkashatu 12 күн бұрын
MashaAllah this is an amazing intro for me. Thanks brother.
@DaniloSilva-pl3sq
@DaniloSilva-pl3sq 2 жыл бұрын
Best FastAPI tutorial so far!
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance
@malkitsingh01
@malkitsingh01 Жыл бұрын
perfect video for the newbies to the framework. Subd for the production quality!
@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
@mzamomahaeng268
@mzamomahaeng268 7 ай бұрын
Amazing video brother, you articulate this so well. It was a wonderful follow along. Please keep up the good work.
@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
@arvidj8918
@arvidj8918 Жыл бұрын
23:52 haha I almost spit out my coffee when you said Alex.... Jones :D
@andrastamasmagyar3731
@andrastamasmagyar3731 19 күн бұрын
Just a quick comment because it came up as an error in my fastapi version so when you define optional in datebase you have to you field as well, e.g.: first_name: Optional[str] = Field(None) Otherwise, amazing contect!! :)
@ndahayokevin7626
@ndahayokevin7626 2 жыл бұрын
Nelson, You are my all time inspiration in software development.
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance
@user-zv7yn9ly5b
@user-zv7yn9ly5b Жыл бұрын
Amazing tutorial, very clear. Thank you a lot!!!
@hygosousa1170
@hygosousa1170 3 ай бұрын
Thank you so much for you share your know knowledge of a manner so simple and directly.
@matthewb2133
@matthewb2133 11 ай бұрын
Such a chill relaxed tutorial. So easy to follow.
@r0f115L4m
@r0f115L4m Жыл бұрын
Wa alaykumus Salaam brother, this tutorial was just what I needed to get started with FastAPI. Awesome stuff! Subscribed.
@ElinLiu0823
@ElinLiu0823 Жыл бұрын
Already deploy fastapi in production,super love it's swagger documentation intergreted.🎉
@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)
@samwelotieno9452
@samwelotieno9452 2 жыл бұрын
I did not know they could specify types in python, learnt something new ...nice
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 For consultation and assistance
@tecgeminis9926
@tecgeminis9926 2 жыл бұрын
Fantastic tutorial, waiting for the next part of this series.
@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?
@dragosg4258
@dragosg4258 9 ай бұрын
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.
@aktanbekaidarov3470
@aktanbekaidarov3470 Жыл бұрын
Thanks for the video! Where are the links regarding Postgresql and integrating db with FastAPI (you mentioned in end of video)?
@RunGuitarMan
@RunGuitarMan Жыл бұрын
Very good video! Simply and clearly explained. Good job, thx!
@unduktea
@unduktea Жыл бұрын
Thank you so much, this video is very informative 👍 Barakallah amigoscode 🙏
@sridharantce
@sridharantce Жыл бұрын
Excellent video. I could learn about FastAPI real quick.
@BbB-vr9uh
@BbB-vr9uh 2 жыл бұрын
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?
@LuvxJacqu4li8e
@LuvxJacqu4li8e Жыл бұрын
Nice. I was jc about how to send data on the post. Thunder Client! Got it. Very nice.
@madukomablessed4712
@madukomablessed4712 Жыл бұрын
Wonderful tutorial! Please which extension you use in vscode to do the auto import for you?
@makumbo22
@makumbo22 2 жыл бұрын
First comment, its a pleasure be your follower my friend.... Regards from Peru!
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 For consultation and assistance.
@haritzmuhammad4343
@haritzmuhammad4343 6 ай бұрын
Waalaikumsalam, I've been your fan from now on, thank you for this great tutorial.
@andersonmedina1310
@andersonmedina1310 8 ай бұрын
Fantastic tutorial You made it seem so simple.
@aqibrehmanpirzada4552
@aqibrehmanpirzada4552 Жыл бұрын
Best Work Brother Masha Allah I am Glad that you made such video very helpful.
@mohammedhimas7105
@mohammedhimas7105 2 жыл бұрын
HI, I AM FROM SRILANKA. MASHA ALLAH VERY HELP FULL VIDEO TO ME. IAM A SOFTWARE ENGINEERING STUDENT IN SRILANKA.
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 For more enlightment and guide lines
@jyoun79
@jyoun79 Ай бұрын
For anyone getting an error about the middle_name value, just make sure your model looks like this for the middle_name: middle_name: Optional[str] = None
@nathandecena7694
@nathandecena7694 2 жыл бұрын
Hi man! This was so informative and easy to follow. Thanks 😎
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance.a
@amantiwari1469
@amantiwari1469 7 ай бұрын
In the User Model, there is a bug, the default value defined for the "id" field as uuid4(), will only be calculated once when the class User loads, and not every time the instance of User is created. Thus all users that didn't specify the id will have the same id.
@sinisterwolf89
@sinisterwolf89 Жыл бұрын
I am a little surprised that Mr Hood did not point out that simple plain reading of the law and emphasis the fact that a second stop is not required, only yielding, which does not require a complete stopping of the vehicle.
@danielkamau8436
@danielkamau8436 2 жыл бұрын
Was looking forward for this from you. Allah answers...must dirty my hands with this tomorrow. From Kenya.
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance .
@LaunchpadMediaGroup1
@LaunchpadMediaGroup1 2 жыл бұрын
Awesome video - I am hoping the Alex Jones reference was on purpose 😂
@AR-co7gd
@AR-co7gd 2 ай бұрын
Very nice video, brother. I only wish you also wrote to PostgreSQL as depicted in the diagram.
@malikgaruba4079
@malikgaruba4079 2 жыл бұрын
Walaykum Salam, Detailed enough to revise. Thanks
@tawfikabdeldaim
@tawfikabdeldaim 2 жыл бұрын
Good video, I was not able to find part 2 and was not able to find the code for this one, can you point me to these?
@Jaimefvs93
@Jaimefvs93 2 жыл бұрын
Amazing tutorial! Thanks for this top content mi amigo. I just had to subscribe
@McMurchie
@McMurchie 2 жыл бұрын
Just starting, so far video is crisp
@mehmetbakideniz
@mehmetbakideniz 9 ай бұрын
I have the following error ' "POST /api/v1/users HTTP/1.1" 405 Method Not Allowed' when I use thunder client for post request. by the way, the tutorial is really great. It is the best that I have found in youtube
@mouhannadal-hmedi1501
@mouhannadal-hmedi1501 2 ай бұрын
what the amazing "Asallamulikum" bro 😂❤
@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
@noirsgames
@noirsgames 2 жыл бұрын
Mashallah, you explained it so clean.
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance
@travel_worldwide_365
@travel_worldwide_365 2 жыл бұрын
Nicely explained. Thanks for uploading.
@MehmetALTINEL
@MehmetALTINEL Жыл бұрын
Aleykumsalam verahmetullahi veberaketu. Thank you for your teaching our brain and touching our hearth.
@arturocdb
@arturocdb 2 жыл бұрын
10 poits for you, for bring theory and methology first…, no one developer do that, thank so much!, great tutorial
@najafzawar4852
@najafzawar4852 10 ай бұрын
Love the way you say Salam😍
@tiagocosta2689
@tiagocosta2689 11 ай бұрын
escelent video. Congracts! If possible, make a video showing how to deploy one rest api. Thanks a lot
@hamzanasirr
@hamzanasirr 2 жыл бұрын
Nelson, you beauty. Stay blessed brother. Jazak ALLAH!
@an-yahuang8778
@an-yahuang8778 2 жыл бұрын
Hi, which extension you use in vscode to do the auto import for you ? it could save a lot of time for a slow typer like me, thanks for the tutorial !
@michaelngecha9227
@michaelngecha9227 Жыл бұрын
Pyforest
@wp4297
@wp4297 2 жыл бұрын
Great job, so helpful. So, new subscriber
@oussamachahidi9201
@oussamachahidi9201 Жыл бұрын
That was Greate my dear brother ! Can u do a tutorial about FastApi-users.
@jesuspereiraoficial
@jesuspereiraoficial 2 жыл бұрын
Great job Bro. Your video is GENIAL!!! Thanks for this...
@playgoods
@playgoods Жыл бұрын
جزاك الله خير I want ask about the best book in fastapi and what the deferent make api with flask and fastapi ❤😊
@mocanada304
@mocanada304 Жыл бұрын
Great content, Thank you so much! I suggest we use the following code for the middle name as "is not None" will not allow us to update the middle name back to "null". instead we should use !="" if user_update.middle_name !="": user.middle_name = user_update.middle_name
@fahadbawazir1771
@fahadbawazir1771 2 жыл бұрын
MASHALLAH 🌹
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance..
@piotrdzwiniel2169
@piotrdzwiniel2169 2 жыл бұрын
Cool tutorial. Thank you very much for it 🙂
@santiagolean2088
@santiagolean2088 Жыл бұрын
You are amaizing man! Thanks
@peterofoz
@peterofoz 7 ай бұрын
2 small errors threw me but here is the fixed code class User(BaseModel): id: Optional[UUID] = uuid4() first_name: str last_name: str middle_name: Optional[str] = None gender: Gender roles: List[Role] class UserUpdateRequest(BaseModel): first_name: Optional[str] = None last_name: Optional[str] = None middle_name: Optional[str] = None roles: Optional[List[Role]] = None
@kiss-liava
@kiss-liava 2 жыл бұрын
Cool! Thank you for the tutorial
@ceno9197
@ceno9197 Жыл бұрын
Perfect course brother.
@rajuveerla9352
@rajuveerla9352 Жыл бұрын
in the post request i have added multiple users they are students and i am getting same uuid for all the users. but i need different uuid for all the users
@nagdali9209
@nagdali9209 2 жыл бұрын
Salam brother This is extremely insightful content
@Khushpich
@Khushpich 2 жыл бұрын
Great video as always. Thanks amigo!
@whatsappadmin2206
@whatsappadmin2206 2 жыл бұрын
👆 ❤️ For consultation and assistance.
@trublaster101
@trublaster101 2 жыл бұрын
Thanks for this course.
@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
@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 ?
@sascha.
@sascha. Жыл бұрын
Great video!
@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?
@ianrios1542
@ianrios1542 2 жыл бұрын
WOW this video came out yesterday?! i was just looking into making a FastAPI API, this is amazing! Thank you so much!
@christophbanz2869
@christophbanz2869 2 жыл бұрын
O
@sf2998
@sf2998 Жыл бұрын
hey great tutorial!!
@anindasadman443
@anindasadman443 5 ай бұрын
which font do you use? seems very clean.
@Fosdark
@Fosdark 4 ай бұрын
Thank for video!
@mahmoudsamir9537
@mahmoudsamir9537 2 жыл бұрын
thank you brother for your efforts
@quadrolang1014
@quadrolang1014 2 жыл бұрын
thanks for this video) you help me!) thank you!
@josemariadiy6400
@josemariadiy6400 2 жыл бұрын
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
REST API Crash Course - Introduction + Full Python API Tutorial
51:57
Quickly Authenticate Users with FastAPI and Token Authentication
46:05
Akamai Developer
Рет қаралды 103 М.
路飞太过分了,自己游泳。#海贼王#路飞
00:28
路飞与唐舞桐
Рет қаралды 42 МЛН
WHO CAN RUN FASTER?
00:23
Zhong
Рет қаралды 30 МЛН
World’s Largest Jello Pool
01:00
Mark Rober
Рет қаралды 126 МЛН
UNO!
00:18
БРУНО
Рет қаралды 4,2 МЛН
Java Data Structures Tutorial
1:39:50
Amigoscode
Рет қаралды 331 М.
Turns out REST APIs weren't the answer (and that's OK!)
10:38
Dylan Beattie
Рет қаралды 137 М.
How to Use FastAPI: A Detailed Python Tutorial
20:38
ArjanCodes
Рет қаралды 227 М.
FastAPI, Flask or Django - Which Should You Use?
9:49
Tech With Tim
Рет қаралды 67 М.
Python FAST API Tutorial
58:20
Tech With Tim
Рет қаралды 327 М.
Python FastAPI Tutorial: Build a REST API in 15 Minutes
15:16
Why You NEED To Learn FastAPI | Hands On Project
21:15
Travis Media
Рет қаралды 158 М.
APIs for Beginners - How to use an API (Full Course / Tutorial)
2:19:33
freeCodeCamp.org
Рет қаралды 4,3 МЛН
APIs for Beginners 2023 - How to use an API (Full Course / Tutorial)
3:07:07
freeCodeCamp.org
Рет қаралды 1,9 МЛН
Pydantic Tutorial • Solving Python's Biggest Problem
11:07
pixegami
Рет қаралды 260 М.
路飞太过分了,自己游泳。#海贼王#路飞
00:28
路飞与唐舞桐
Рет қаралды 42 МЛН