Python FastAPI Tutorial: How to build modern RESTful APIs with Python

preview_player
Показать описание
In this Python video tutorial you will dive into FastAPI, a web framework for developing modern RESTful APIs using Python. FastAPI is built off of Starlette and Pydantic, therefore the performance of FastAPI is off the charts. Pydantic allows type hints to perform data validation and serialization / deserialization of data. FastAPI automatically creates interactive Swagger UI documentation which is perfect for any developer.

🎓 Check these out 🎓
===========================================

🎓 Courses can be found:

💻 GitHub Repo 💻
* Follow README to get started *

⭐ Timestamps ⭐
===========================================
00:00 - Intro
02:42 - IDE and Virtual ENV setup
05:46 - Install FastAPI and Uvicorn
07:38 - Writing first RESTful API
08:42 - Starting FastAPI Application
10:00 - Swagger UI Docs
11:10 - Path Parameters
12:17 - Pydantic and Models
16:33 - POST Request Method
23:23 - PUT Request Method
24:50 - HTTP Exceptions
26:00 - DELETE Request Method
27:00 - Put it all together

⭐️ Hashtags ⭐️
#codingwithroby #FastAPITutorial
Рекомендации по теме
Комментарии
Автор

Great tutorial! i needed exactly those two videos for my project dwo tommorow, and i had no hope on finishing it on time... thank you very very much!

tlylfpx
Автор

Very good tutorial! For PUT (update) and DELETE you can use "for i, x in enumerate(BOOKS):" instead of the counter and then use "i" as the index e.g. del BOOKS[i]. "enumerate" automatically counts for you in a for loop. It's a bit cleaner than using a counter.

waldschratler
Автор

awesome tutorial. I wouldn't use a for-loop btw. Rather use something like:
# Find the index of the item to delete
item_index = next((index for (index, d) in enumerate(books) if d.id == book_id), None)

# Check if book exists
if item_index is None:
raise HTTPException(status_code=404, detail=f"Id {book_id} does not exist")

books[item_index] = book
return book

rstiekema
Автор

VERY NICE, WITH A GOOD EXPLANATIONS, THINK YOU

ramdanebachir
Автор

Hi Roby, Just a doubt.. Why the same UUID is showing for every item posted. Why do we need to manually change the same? Can't it be uniquely generated?

checkmate
Автор

I have an OCR python program and i want to use it in my electron project can i ?

samianisbouchbout
Автор

This takes same book multiple times. How to resolve this

bharathchandrapanasa
Автор

Can you make a SQLModel video with

Select where(single, multiple condition), joins, etc???

chriskeo
Автор

Hello couple of questions about your course...
-Can it teach me how to get requests from commercial APIs and store them to a database?
-Does it teach about custom styling the API data on the front end?
-Does it teach at least some JavaScript DOM manipulation or event listeners?
I'm interested on playing around different public APIs and display them on the browser with custom styling and click events. Thanks

Frangelo