In this video, we build our CRUD functionality replacing the in-memory database (Python-list) with persistence from a real database (PostgreSQL). We also look at organizing our CRUD code to separate database logic from the route code.
#python #fastapi #api #apidevelopment
SOURCE CODE:
https://github.com/jod35/fastapi-beyo...
COURSE WEBSITE:
https://jod35.github.io/fastapi-beyon...
PLEASE DONATE TO THE CHANNEL THROUGH:
BUY ME A COFFEE:
https://buymeacoffee.com/jod35
PATREON:
/ jod35
You can also consider Becoming a member of this channel.
FOLLOW ME:
X:
https://x.com/jod35_
GITHUB:
http://github.com/jod35
Timestamps:
(00:00:00) Introduction and fixing database structure
(00:02:47) Creating the service class
(00:13:39) Handling the CRUD methods
(00:28:37) Intro to dependency injection
(00:30:05) Create the session dependency
(00:34:11) CRUD using Dependency Injection and the service class
(00:48:40) Testing the CRUD and fixing errors
(01:06:08) Conclusion