Python FastAPI Tutorial - Adding a Database - SQLAlchemy Models and Relationships - Part 5
Corey Schafer via YouTube
-
70
-
- Write review
Overview
Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Learn how to integrate a database into your FastAPI application using SQLAlchemy in this comprehensive tutorial. Transition from storing data in Python lists that reset on server restart to implementing a persistent SQLite database with proper SQLAlchemy models and relationships between users and posts. Explore the distinction between SQLAlchemy models and Pydantic schemas, understand their respective roles in database operations and API serialization, and master FastAPI's dependency injection system for managing database sessions. Discover best practices for structuring database-driven applications and gain insights into scaling your SQLite setup to production databases like PostgreSQL or MySQL. Build a solid foundation for creating robust, persistent FastAPI applications with proper data modeling and relationship management.
Syllabus
Python FastAPI Tutorial (Part 5): Adding a Database - SQLAlchemy Models and Relationships
Taught by
Corey Schafer