Python FastAPI Tutorial 2 - Semi Static Generated Blog - Async Database, Migration System, And API

preview_player
Показать описание
Today I go over setting up an async sqlite database for fastapi, setting up a migration system for that database, and create an API to create, delete, and update a blog. Kind of a long one, maybe I should have separated the API into another video?

00:00 End Result Preview
0:39 Agenda
1:46 Installing Packages & Overview
3:00 Adding To App Script
4:30 Init Migration System
5:06 Add A Blog Model
8:45 Setup Migration Configs
11:23 Add And Run Migration
13:17 Revert Migration Demo & Cleanup
15:35 Create A Config File
16:14 Create Database Client
19:08 Create API Router & Routes P1
22:10 Create Request Models & Exceptions
27:16 Create API Router & Routes P2
29:57 Create Database Actions
35:29 Create URL Path Generator
36:41 Create API Router & Routes P3
39:28 Test Final Blog API
40:53 Recap
41:53 Next Video Info

Links:
Рекомендации по теме
Комментарии
Автор

thanks for the good video It is interesting to create a db session as async . It seems to be a good program with a good structure. Thank you.

cwxddel
Автор

Hi friend. Your tutorial is very good. I hope you have part 3 ready to post someday. But, until then, could you share the source code with us? Thanks!!

theorangewill
Автор

Can you please write a test for it? When I call the getSession() in a function. I get an error saying the transaction is closed. but I do not get that error when I pass it as a dependency to a function

paulkofiosei