Python FastAPI Tutorial - Adding a Database - SQLAlchemy Models and Relationships - Part 5
Corey Schafer via YouTube
-
69
-
- Write review
NY State-Licensed Certificates in Design, Coding & AI — Online
AI, Data Science & Cloud Certificates from Google, IBM & Meta
Overview
Build a Learning Habit
Download Class Central's free printable study calendar
Download for Free
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