Building a REST API with FastAPI, Async SQLModel, and PostgreSQL
Автор: Ssali Jonathan
Загружено: 2024-04-06
Просмотров: 21931
In this video, we Build a REST API with FastAPI, SQLModel, and PostgreSQL.
SQLModel is an ORM built to combine the powerful SQLAlchemy ORM with the useful Pydantic data validation library, enabling us to create database models that can be used for data validation.
#Python #apidevelopment #fastapi
SOURCE CODE:
https://github.com/jod35/lib-api.git
BUY ME A COFFEE:
https://buymeacoffee.com/jod35
JOIN MY DISCORD SERVER:
/ discord
(00:00:00) introduction
(00:00:30) Project set up
(00:03:02) Create a simple web server
(00:08:45) Lifespan events
(00:17:41) Create a PostgreSQL database
(00:17:44) Manage settings with Pydantic
(00:26:29) Create a connection to the database
(00:35:24) Create database models
(00:45:08) Create the database tables in PostgreSQL
(00:50:30) Sharing the session with Dependency Injection
(00:57:06) Building API endpoints with Routers
(01:07:22) Implementing the CRUD in a service file
(01:10:33) Get all resources
(01:14:57) Pydantic models for validation
(01:19:57) Create a resource
(01:30:00) Retrieve, Update, and Delete
(01:47:51) OpenAPI docs (Swagger)
(01:48:26) Adding schema example for Swagger to POST endpoint
(01:50:12) Conclusion
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: