FastAPI Tutorial: Build and Deploy a Web App (Corey Schafer)
- Course audio
- Course audio: English
- Level
- Intermediate
- Length
- 19 lessons · 14.6 hours
What you'll be able to do
- Create API endpoints with path parameters and Pydantic validation
- Add a database and implement full CRUD
- Implement user authentication, authorization and file uploads
- Test the API and deploy it with a VPS or Docker
About this course
Corey Schafer builds a complete FastAPI project in English over 19 parts and about 14.6 hours. The series starts with a first web app and an HTML frontend, then covers path parameters, Pydantic schemas, adding a database and completing CRUD. It compares sync with async code, organises the project with routers, connects frontend forms, and adds authentication, authorization, file uploads for images, pagination and password reset by email. Later parts move to PostgreSQL with Alembic, AWS S3 with Boto3 and testing the API. Two closing lessons deploy the app to a VPS and with Docker. It assumes you can already write Python and understand basic web ideas.
Before you start: Python basics including functions and classes; Basic understanding of web apps and HTTP
Syllabus
19 lessons · 14:38:37 in total
- 1Python FastAPI Tutorial (Part 1): Getting Started - Web App + REST API23:54
- 2Python FastAPI Tutorial (Part 2): HTML Frontend for Your API - Jinja2 Templates37:26
- 3Python FastAPI Tutorial (Part 3): Path Parameters - Validation and Error Handling36:56
- 4Python FastAPI Tutorial (Part 4): Pydantic Schemas - Request and Response Validation24:23
- 5Python FastAPI Tutorial (Part 5): Adding a Database - SQLAlchemy Models and Relationships1:03:00
- 6Python FastAPI Tutorial (Part 6): Completing CRUD - Update and Delete (PUT, PATCH, DELETE)36:22
- 7Python FastAPI Tutorial (Part 7): Sync vs Async - Converting Your App to Asynchronous32:10
- 8Python FastAPI Tutorial (Part 8): Routers - Organizing Routes into Modules with APIRouter20:13
- 9Python FastAPI Tutorial (Part 9): Frontend Forms - Connecting JavaScript to Your API29:04
- 10Python FastAPI Tutorial (Part 10): Authentication - Registration and Login with JWT57:30
- 11Python FastAPI Tutorial (Part 11): Authorization - Protecting Routes and Verifying Current User38:24
- 12Python FastAPI Tutorial (Part 12): File Uploads - Image Processing, Validation, and Storage34:31
- 13Python FastAPI Tutorial (Part 13): Pagination - Loading More Data with Query Parameters36:32
- 14Python FastAPI Tutorial (Part 14): Password Reset - Email, Tokens, and Background Tasks58:55
- 15Python FastAPI Tutorial (Part 15): PostgreSQL and Alembic - Database Migrations for Production47:54
- 16Python FastAPI Tutorial (Part 16): AWS S3 and Boto3 - Moving File Uploads to the Cloud47:38
- 17Python FastAPI Tutorial (Part 17): Testing the API - Pytest, Fixtures, and Mocking External Services1:22:26
- 18Python FastAPI Tutorial (Part 18): Deploy to a VPS - Security, Nginx, SSL, and Custom Domain1:32:05
- 19Python FastAPI Tutorial (Part 19): Deploy with Docker - Serverless Containers and Custom Domain1:19:14
Questions
- How long is this course?
- It has 19 lessons and about 14.6 hours of video (14:38:37 in total). Your progress is saved lesson by lesson, so you can stop and continue on any device you sign in on, or in the same browser without signing in.
- Is this course in English?
- The lessons are taught in English. The teacher is Corey Schafer; the videos play from their official YouTube channel, and Sabaq adds the lesson order, progress tracking, notes and the summary on this page.
- Who is this course for, and what should I know first?
- It is aimed at learners who already know the basics. Before you start: Python basics including functions and classes; Basic understanding of web apps and HTTP.
- Is it free, and do I need an account?
- Yes, it is free to watch and no account is needed. The videos are official uploads by the teacher on YouTube; a free DanixSoft account is optional and only syncs your progress between devices.
- What should I take after this course?
- A good next step on Sabaq is “Neural Networks: Zero to Hero (Andrej Karpathy)”. The “What to take next” list on this page shows more courses at the same or a higher level in the same topic.
What to take next

Neural Networks: Zero to Hero (Andrej Karpathy)
Andrej Karpathy
English18.6 h9 lessonsAdvanced

MIT 6.0001: Introduction to Computer Science and Programming in Python
MIT OpenCourseWare
English10 h38 lessonsIntermediate

CS50's Introduction to Artificial Intelligence with Python
CS50
English12.7 h8 lessonsIntermediate
Related courses
Videos by Corey Schafer, played from their official YouTube channel. Subscribe on YouTube
Official upload by the teacher or institution on their own channel, shown with YouTube's embedded player.
Lessons listed from the official YouTube playlist. Full playlist on YouTube
Lessons last checked Nov 2026. Course summary and lesson structure by Sabaq.
Report a problem or a rights request