FastAPI #2 - Path Parameters / Data Validation with Type-Hints & Enums

preview_player
Показать описание

In this video, we'll look at Path Parameters in FastAPI and data validation with type-hints and Enums in Python.

We'll create a List endpoint and a Detail endpoint, where the detail endpoint uses a Path Parameter to identify the correct object for use in this endpoint.

We'll also create an endpoint that allows users to filter with a path parameter, and the range of possible values is controlled by a Python Enum class.

📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
00:26 Creating List Endpoint
02:16 Creating Detail Endpoint with FastAPI Path Parameter
06:58 API documentation for endpoints
08:53 Customising HTTP response status code
09:44 Using Enums to limit possible path parameter values

☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:

▶️ Full Playlist:

𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:

📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:

#python #fastapi #webdevelopment
Рекомендации по теме
Комментарии
Автор

Always a pleasure to learn some from yours ! Thank you so much master !

seydinaoumarsamabaly
Автор

Love your content on FastAPI! Would love to see a video on authentication with FastAPI and HTMX.

mickhuby
Автор

Another great one.Thanks for your sharing your valuable time with us.

AmoahDevLabs
Автор

It's always cool to relearn quickly. I left a quick comment on your first video I hope you have the time to look at it.

Thank you

alexandrodisla
Автор

Well done, there is a simple request: can you collect all the videos related to the series into a playlist? ❤

murtadanazar
Автор

4:51 What about this instead?
`band = BANDS[band_id] if band_id < len(BANDS) else None`

Chiramisudo
Автор

Are you still gonna upload django tutorials/vids or primarily fastapi for now?

Cyrixau