มาลองเล่น FastAPI กัน
mikelopster
@mikelopsterAbout
Where Hipster Meets Code. Making Complex Simple! ผมเป็นเพียงชายคนหนึ่งที่รักในการเขียนและเล่าเรื่องราวผ่านการ coding อะไรที่เกี่ยวกับ programming เราจะจัดให้คุณเอง ! 😁 "Trust you intuition จงเชื่อในสัญชาตญาณของตัวคุณเอง" ติดตามเราที่ช่องทางอื่นๆได้เช่นกัน - Facebook: https://www.facebook.com/mikelopster.dev - Website: https://mikelopster.dev/ - My personal documents and notes: https://docs.mikelopster.dev/
Latest Posts
Video Description
☕️ สนับสนุนช่องเราด้วยการสมัครสมาชิกช่องทางนี้ได้เลย https://www.youtube.com/channel/UC3YgTINPYQmUcRt5ZcNFIZQ/join ลองไมค์ สัปดาห์นี้ เราจะมาพูดถึง web framework ตัวหนึ่งที่ใช้สำหรับการทำ API ของฝั่ง Python ที่ได้ขึ้นชื่อว่า "เร็วแรง" อีกหนึ่งตัว นั่นก็คือ "FastAPI" เราจะมาทำความรู้จักกับ FastAPI ว่ามันคืออะไร เราสามารถใช้ Python พัฒนาโดยใช้ FastAPI อย่างไรได้บ้าง มาดูกันในหัวข้อลองไมค์นี้กันครับ โดยในหัวข้อนี้ เราจะมีการพูดถึงประเด็นเหล่านี้กัน 1. รู้จักกับ FastAPI ว่าคืออะไร 2. มาเริ่มต้นทำ FastAPI กับ CRUD API กัน (พร้อมกับ Swagger และ Redoc) 3. ลองต่อ relational database ด้วย FastAPI 4. แนะนำเรื่อง requirements.txt และ .env 5. แนะนำเรื่องการ deployment ตัว FastAPI โดยหัวข้อนี้ เราจะเน้นหนักไปที่พื้นฐานของ FastAPI ให้ทุกคนได้เห็นกันก่อนเป็นหลัก หากเพื่อนๆสนใจหัวข้อไหนเพิ่มเติมของ Framework นี้ก็ comment กันไว้ได้นะครับ 😁 หัวข้อ 00:00 แนะนำหัวข้อ 01:27 FastAPI คืออะไร 04:26 ลง FastAPI 09:21 เริ่ม Hello World ด้วย FastAPI 16:11 แนะนำ Swagger และ Redoc ใน FastAPI 19:02 (เพิ่มเติม) ทำไมผมถึงสนใจ FastAPI 21:02 แนะนำ การรับ param และ query ใน GET API 27:00 แนะนำ Post API กับการรับ request ทั่วไป 31:12 เพิ่มเติมด้วย Pydantic เข้าไปสำหรับทำ validation 39:04 แนะนำ Put API, Delete API 41:27 เริ่มต้น แนะนำ Relational Database กับ SQLAlchemy ใน FastAPI 45:14 ภาพใหญ่การเชื่อมกัน ระหว่าง Backend, Pydantic, SQLAlchemy 52:04 ลง SQLAlchemy เข้า project 52:46 Step 1 - Database ORM Config 55:22 Step 2 - สร้าง Database Model (SQLAlchemy) 59:21 Step 3 - สร้าง Pydantic Model 1:04:40 Step 4 - ประกอบเข้ากับ CRUD 1:23:59 สรุปการต่อ relational database, ปรับ structure file 1:29:57 รู้จักกับ requirements.txt 1:31:08 รู้จักกับ .env 1:32:47 แนะนำเพิ่มเติมเรื่องการ deployment FastAPI 1:34:25 สรุปหัวข้อ สามารถอ่าน Blog เพิ่มเติมได้ที่ https://mikelopster.dev/posts/fastapi-basic ใครมีข้อสงสัยเพิ่มเติม มาพูดคุยแลกเปลี่ยนความรู้กันได้ที่ Facebook page: https://www.facebook.com/mikelopster.dev Website: https://mikelopster.dev แปะพิกัดของที่ผมใช้ https://shope.ee/6fI75UuLEM osmo pocket 3 https://shope.ee/4VDcVixCW9 ไมค์ shure https://shope.ee/6pbXI6d5xG กล้องวงจรปิด Enjoy ครับ 😘
You May Also Like
Upgrade Your Everyday
AI-recommended products based on this video

Amazon Echo Show 8 (newest model), With Spatial Audio, Smart Home Hub, and Alexa, Charcoal

Apple AirPods 4 Wireless Earbuds, Bluetooth Headphones, with Active Noise Cancellation, Adaptive Audio, Transparency Mode, Personalized Spatial Audio, USB-C Charging Case, Wireless Charging, H2 Chip

Wireless Earbuds, Bluetooth 5.4 Headphones, True Wireless Stereo Earphones with IPX7 Waterproof, Noise Cancelling Mic, Fast Charging and Comfort Fit Ear Buds for Sports/Workouts - Black

Apple AirPods 4 Wireless Earbuds, Bluetooth Headphones, Personalized Spatial Audio, Sweat and Water Resistant, USB-C Charging Case, H2 Chip, Up to 30 Hours of Battery Life, Effortless Setup for iPhone

Apple AirPods Pro 2 Wireless Earbuds, Active Noise Cancellation, Hearing Aid Feature, Bluetooth Headphones, Transparency, Personalized Spatial Audio, High-Fidelity Sound, H2 Chip, USB-C Charging

Smart Watch for Men/Women, 1.95" AMOLED Fitness Tracker Watches with Bluetooth Calls/Flashlight/100+ Sport Modes Heart Rate/Sleep Monitor Ultra Lightweight Ultrathin Design

Smart Watch for Men Women (Answer/Make Call), 1.96" HD Smartwatch Fitness Activity Tracker, 110+ Sports IP68 Waterproof, Heart Rate/Sleep Monitor/Pedometer/Calories, Fitness Watch for Android iOS
![Apple Watch Series 10 [GPS 46mm case] Smartwatch with Rose Gold Aluminium Case with Light Blush Sport Band - M/L. Fitness Tracker, ECG App, Always-On Retina Display, Water Resistant](https://m.media-amazon.com/images/I/61nNNMI1cFL._AC_UL960_FMwebp_QL65_.jpg)
Apple Watch Series 10 [GPS 46mm case] Smartwatch with Rose Gold Aluminium Case with Light Blush Sport Band - M/L. Fitness Tracker, ECG App, Always-On Retina Display, Water Resistant
![Apple Watch Series 10 [GPS 42mm case] Smartwatch with Jet Black Aluminium Case with Black Sport Band - S/M. Fitness Tracker, ECG App, Always-On Retina Display, Water Resistant](https://m.media-amazon.com/images/I/6105jZyXyPL._AC_UL960_FMwebp_QL65_.jpg)
Apple Watch Series 10 [GPS 42mm case] Smartwatch with Jet Black Aluminium Case with Black Sport Band - S/M. Fitness Tracker, ECG App, Always-On Retina Display, Water Resistant

NOCO Boost GB40: 1000A UltraSafe Jump Starter – 12V Lithium Battery Booster Pack, Portable Jump Box, Power Bank & Jumper Cables - for 6.0L Gas and 3.0L Diesel Engines

UGREEN Nexode Power Bank 20000mAh 130W Portable Charger 72Wh PD Fast Charging 3-Port USB C Battery Pack with TFT Smart Display for MacBook/iPad/iPhone 16/Samsung S24 and More

ANKER 737 Power Bank, 24,000mAh 3-Port Laptop Portable Charger with 140W Fast Charging, Smart Display, for Outdoor Work, Compatible with iPhone 16/15/14 Series, Vision Pro, Samsung, MacBook, and More

VOLTME Portable Charger, Slim 10000mAh 5V/3A Power Bank, USB C in&Out High-Speed Charging Battery Pack, Travel Essentials Dual Output Compatible with iPhone 16 15 14 13 12 Samsung Google iPad etc

Apple AirPods 4 Wireless Earbuds, Bluetooth Headphones, with Active Noise Cancellation, Adaptive Audio, Transparency Mode, Personalized Spatial Audio, USB-C Charging Case, Wireless Charging, H2 Chip

Apple AirPods 4 Wireless Earbuds, Bluetooth Headphones, Personalized Spatial Audio, Sweat and Water Resistant, USB-C Charging Case, H2 Chip, Up to 30 Hours of Battery Life, Effortless Setup for iPhone

Apple AirPods Pro 2 Wireless Earbuds, Active Noise Cancellation, Hearing Aid Feature, Bluetooth Headphones, Transparency, Personalized Spatial Audio, High-Fidelity Sound, H2 Chip, USB-C Charging

Bose QuietComfort Bluetooth Headphones, Wireless Headphones with Active Over Ear Noise Cancelling and Mic, Deep Bass, Up to 24 Hours of Playtime, White Smoke

Barnyard Designs Indoor Herb Garden Planter Set with Tray, Metal Windowsill Plant Pots with Drainage for Outdoor or Indoor Plants, Set/3 (Black)

Eye Contact Web Camera for Desktop Computer – 1080P USB Camera with Microphone & Stand, Center Cam for Laptop or Desktop, Manual Focus, Plug & Play for macOS & Windows(Black)
![PEHAEL 3+3Pack for iPhone 17 Pro Max Privacy Screen Protector with Camera Lens Protector Full Coverage Anti-Spy Tempered Glass Film 9H Hardness Easy Installation Bubble Free [6.9 inch]](https://m.media-amazon.com/images/I/61PnVkv6KKL._AC_UL960_FMwebp_QL65_.jpg)
PEHAEL 3+3Pack for iPhone 17 Pro Max Privacy Screen Protector with Camera Lens Protector Full Coverage Anti-Spy Tempered Glass Film 9H Hardness Easy Installation Bubble Free [6.9 inch]
![Ailun 3 Pack Screen Protector for iPhone 16 Pro Max [6.9 inch] + 3 Pack Camera Lens Protector with Installation Frame,Sensor Protection,Dynamic Island Compatible,Case Friendly Tempered Glass Film](https://m.media-amazon.com/images/I/815keamN-BL._AC_UL960_FMwebp_QL65_.jpg)
Ailun 3 Pack Screen Protector for iPhone 16 Pro Max [6.9 inch] + 3 Pack Camera Lens Protector with Installation Frame,Sensor Protection,Dynamic Island Compatible,Case Friendly Tempered Glass Film







