In the "FastAPI Beyond CRUD" course, you'll move beyond the basics and dive into advanced API development with FastAPI. This course is perfect for developers who are already comfortable with CRUD operations and are eager to explore the powerful features that FastAPI has to offer. You'll start by learning how to set up a FastAPI project and run a simple web server, before quickly progressing to more advanced topics like building REST APIs, managing path and query parameters, and working with databases using SQLModel. Additionally, you'll learn how to manage settings with Pydantic, organize your API with routers, and implement asynchronous SQLModel connections.
As the course progresses, you'll learn about key topics in user authentication and application security, including role-based access control, JWT authentication, and hashing passwords. The intricacies of middleware, dependency injection, and error handling—including the development of unique exceptions and handlers—will also be covered in detail. The course goes one step further and explains how to utilize Celery and Redis to manage background processes, add email support for user authentication, and use Flower to monitor Celery Workers.
The series includes parts on API documentation with SwaggerUI and ReDoc and thorough testing methodologies to help you ensure your APIs are suitable for production. With tools like Unittest Mock and Pytest, you'll become an expert at unit testing, while Schemathesis will let you investigate document-driven testing. Lastly, you will discover how to publish your FastAPI program on websites like Render.com.
You will have a thorough understanding of advanced FastAPI features by the end of the course, empowering you to create high-performance, scalable, and secure APIs that do much more than basic CRUD tasks.
SOURCE CODE:
https://github.com/jod35/fastapi-beyond-CRUD
CONTRIBUTE TO THE DOCS:
https://github.com/jod35jon/fastapi-beyond-crud-docs
COURSE WEBSITE:
https://jod35.github.io/fastapi-beyond-crud-docs/site/
PLEASE DONATE TO THE CHANNEL THROUGH:
BUY ME A COFFEE:
https://buymeacoffee.com/jod35
PATREON:
https://www.patreon.com/jod35
You can also consider Becoming a member of this channel.
FOLLOW ME:
X:
https://x.com/jod35_
GITHUB:
http://github.com/jod35
TIMESTAMPS
0:00 - Introduction
1:00 - Project setup
7:30 - Build a simple web server
10:45 - Run the server with FastAPI CLI
14:11 - Path parameters
17:23 - Choosing an HTTP client
20:58 - Query parameters
24:40 - Using Path and Query parameters
26:51 - Optional Query parameters
31:48 - Request Body
39:11 - Read and set headers
49:43 - Build a REST API on a Python List
1:23:37 - Organize API Paths with Routers
1:38:22 - Databases With SQLModel
1:42:33 - Set up a database
1:44:13 - Settings management with Pydantic settings
1:53:38 - Async SQLModel setup
1:58:38 - Database connection with lifespan events
2:10:02 - Creating a database model with SQLModel
2:20:00 - Creating database tables
2:27:08 - CRUD With SQLModel
2:29:48 - Separate CRUD logic using service classes
2:55:53 - Intro to Dependency Injection
3:01:20 - Use service methods in API path handlers
3:33:35 - Create the user auth model
3:42:09 - Database Migrations With Alembic
3:59:57 - User Account Creation
4:18:55 - Password hashing with passlib
4:25:42 - User Account Creation endpoint
4:42:57 - Intro to JWT Authentication
4:48:29 - PyJWT Setup
5:01:13 - User Login Endpoint
5:13:59 - HTTP Bearer Authentication
5:33:14 - Regaining Access with refresh tokens
5:50:04 - Revoking Tokens using Redis
6:07:39 - Role-Based Access Control
6:09:45 - Get the currently authenticated user
6:20:25 - Add roles to the user model
6:26:55 - Create the Role Checker dependency
6:39:24 - Handle Model and Schema Relationships
7:05:53 - More Model and Schema Relationships
7:59:58 - Error Handling
8:04:06 - Create custom API Exceptions
8:18:14 - Create exception handlers for those exceptions
8:23:26 - Register Error handlers on the app
8:33:25 - Intro to Middleware
8:36:54 - Create a custom logging middleware
8:53:28 - Another middleware example
8:59:36 - Use Custom ASGI middleware with FastAPI
9:00:21 - Adding CORS Middleware
9:03:34 - Adding Trusted Hosts
9:05:04 - Adding Email support
9:06:39 - Setting Up FastAPI-Mail
9:21:46 - Sending your first email
9:31:21 - User account verification
10:07:51 - Password Resets
10:40:38 - Background Tasks
10:43:00 - FastAPI Background Tasks
10:45:44 - Background Tasks with Celery and Redis
11:16:17 - Celery Monitoring With Flower
11:23:48 - API Docs with SwaggerUI and Redoc
11:36:02 - API Testing
11:37:10 - Unit-tests with Unittest Mock and Pytest
12:01:27 - Document-driven Testing with Schemathesis
12:09:17 - Deployment on Render.com
Best YouTube to MP3 Converter
Tube MP3 is the leading converter which allows you to convert YouTube videos to MP3 files with just a few clicks. It supports high quality MP3 up to 320kbps. Enjoy listening to your favorite YouTube songs in offline mode.