▶️ Playlist: https://www.youtube.com/playlist?list=PL-2EBeDYMIbQghmnb865lpdmYyWU3I5F1
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:
https://ko-fi.com/bugbytes
▶️ Full Playlist:
https://www.youtube.com/playlist?list=PL-2EBeDYMIbQghmnb865lpdmYyWU3I5F1
𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: https://bugbytes.io/posts/
👾 Github: https://github.com/bugbytes-io/
🐦 Twitter: https://twitter.com/bugbytesio
📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
FastAPI Path Parameters: https://fastapi.tiangolo.com/tutorial/path-params/
#python #fastapi #webdevelopment