Loading video player...
In this video, we'll be learning how to build a full-featured web application from the ground up using the FastAPI framework in Python. This is the complete series compiled into one long video, covering everything from creating your first route all the way through deploying a production-ready application with a custom domain. We'll build both a JSON API for programmatic access and HTML pages that users can browse in the browser, so you'll come away knowing how to use FastAPI for either purpose. Along the way, we'll set up a database with SQLAlchemy, write Pydantic models for request and response validation, and implement complete CRUD operations. We'll add user registration and login with secure password hashing and JWT authentication, protect routes by verifying the current user, and handle file uploads with image processing and validation. We'll convert our app to async, organize our code with routers, build out frontend forms that connect to the API with JavaScript, and add pagination, password reset flows with background email tasks, and database migrations with Alembic. Toward the end, we'll move from SQLite to PostgreSQL, move our file storage from local disk to AWS S3 with Boto3, write tests with Pytest, and finally deploy the application two different ways — first to a VPS with Nginx and SSL, and then with Docker to a serverless container platform. Whether you're new to FastAPI or have used it for small projects and want to see how a real production application comes together, this video will give you a solid foundation. Let's get started... Timestamps: (00:00:00) Getting Started - Web App + REST API (00:23:04) HTML Frontend for Your API - Jinja2 Templates (00:59:53) Path Parameters - Validation and Error Handling (01:36:09) Pydantic Schemas - Request and Response Validation (01:59:51) Adding a Database - SQLAlchemy Models and Relationships (03:01:54) Completing CRUD - Update and Delete (PUT, PATCH, DELETE) (03:37:35) Sync vs Async - Converting Your App to Asynchronous (04:08:58) Routers - Organizing Routes into Modules with APIRouter (04:28:18) Frontend Forms - Connecting JavaScript to Your API (04:56:21) Authentication - Registration and Login with JWT (05:52:58) Authorization - Protecting Routes and Verifying Current User (06:30:32) File Uploads - Image Processing, Validation, and Storage (07:04:13) Pagination - Loading More Data with Query Parameters (07:40:06) Password Reset - Email, Tokens, and Background Tasks (08:38:03) PostgreSQL and Alembic - Database Migrations for Production (09:25:04) AWS S3 and Boto3 - Moving File Uploads to the Cloud (10:11:44) Testing the API - Pytest, Fixtures, and Mocking External Services (11:33:16) Deploy to a VPS - Security, Nginx, SSL, and Custom Domain (13:04:21) Deploy with Docker - Serverless Containers and Custom Domain The code from this video can be found here: https://github.com/CoreyMSchafer/FastAPI-Full-Course Full FastAPI Course Playlist (Individual Videos): https://www.youtube.com/playlist?list=PL-osiE80TeTsak-c-QsVeg0YYG_0TeyXI ✅ Support My Channel Through Patreon: https://www.patreon.com/coreyms ✅ Become a Channel Member: https://www.youtube.com/channel/UCCezIgC97PvUuR4_gbFUs5g/join ✅ One-Time Contribution Through PayPal: https://goo.gl/649HFY ✅ Cryptocurrency Donations: Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3 Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33 Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot ✅ Corey's Public Amazon Wishlist http://a.co/inIyro1 ✅ Equipment I Use and Books I Recommend: https://www.amazon.com/shop/coreyschafer ▶️ You Can Find Me On: My Website - http://coreyms.com/ My Second Channel - https://www.youtube.com/c/coreymschafer Facebook - https://www.facebook.com/CoreyMSchafer Twitter - https://twitter.com/CoreyMSchafer Instagram - https://www.instagram.com/coreymschafer/ #Python #FastAPI