Backend Development with FastAPI

Micro Free Course — 100% Free Learning

All lessons in this module are free to learn. Sign in with Google to save your progress.

1

Data Layer and Auth

SQLAlchemy 2.0 ORM (modern Mapped style); Alembic migrations; Pydantic vs SQLAlchemy models (separation); JWT authentication and OAuth2; role-based authorization patterns.

Module Progress0% Complete
101 min total
10 Lessons
0 Completed

Module Content

SQLAlchemy 2.0 ORM

The modern SQLAlchemy: typed Mapped columns, declarative style, async support. The standard Python ORM. FIND_VIDEO: search 'sqlalchemy 2.0 tutorial mapped' — recommended channel: ArjanCodes / Mike Bayer talks. Aim for 11 min or under.

10 minVideo
Start

Quiz: Mapped Columns, Sessions & Query Patterns

SQLAlchemy 2.0's modern style: Mapped types, sessions, select() syntax, common query patterns.

7 minTutorial
Start

Database Migrations with Alembic

Schema changes as code. Alembic generates migration scripts; running them migrates production safely. FIND_VIDEO: search 'alembic database migrations fastapi tutorial' — recommended channel: ArjanCodes / Pretty Printed. Aim for 10 min or under.

12 minVideo
Start

Quiz: Manual vs Autogenerate Migration Patterns

When to autogenerate, when to write by hand, and the patterns for safe schema changes in production.

7 minTutorial
Start

Why Pydantic for API Models

Why your DB models and your API models should be different types — and how to convert cleanly. FIND_VIDEO: search 'pydantic sqlalchemy separation api models' — recommended channel: ArjanCodes. Aim for 9 min or under.

14 minVideo
Start

Quiz: Separation of Concerns & Response Shaping

The 'one model per layer' pattern, ORM-to-Pydantic conversion, and avoiding data leaks.

7 minTutorial
Start

Authentication — JWT & OAuth2

The standard auth pattern: hash passwords, issue JWTs, OAuth2 flow. The auth layer of any modern API. FIND_VIDEO: search 'fastapi jwt authentication oauth2 tutorial' — recommended channel: ArjanCodes / Tech with Tim. Aim for 11 min or under.

20 minVideo
Start

Quiz: Token-Based Auth Flow

The end-to-end JWT auth: signup, login, hash passwords with bcrypt, issue tokens, validate via dependency.

7 minTutorial
Start

Authorization — Roles & Permissions

Authentication says who; authorization says what. Roles, permissions, scopes, and the dependency patterns. FIND_VIDEO: search 'fastapi role based access control RBAC' — recommended channel: ArjanCodes. Aim for 10 min or under.

10 minVideo
Start

Quiz: RBAC Patterns & Scopes

Role-based and permission-based access control in FastAPI, OAuth2 scopes, and the practical patterns for production.

7 minTutorial
Start