Ưu đãi trong tuần: Nhập mã UD50 giảm 50k cho đơn từ 300k!
Trang chủ
Menu

FastAPI Complete Course: JWT, SQLModel, Celery & Deployment

Khóa học toàn diện về FastAPI: JWT, SQLModel, Celery & Triển khai

Khóa học toàn diện về FastAPI: JWT, SQLModel, Celery & Triển khai

Làm chủ FastAPI: Xây dựng REST API với JWT, SQLModel bất đồng bộ, RBAC, Celery, Redis, Email, Kiểm thử & Triển khai sản xuất

4.7
(18 đánh giá)
137 học viên
Giảng viên
EduVerse Academy
Phụ đề Việt chất lượng cao Phụ đề tiếng Anh Bán chạy Đánh giá cao
50.000đ 399.000đ -87%
✓ Xem giỏ hàng và thanh toán
Bao gồm phụ đề tiếng Việt, tiếng Anh
15.0 giờ video
25 bài giảng
Truy cập vĩnh viễn
Học trên mọi thiết bị
Cập nhật: 31/05/2026

Bạn sẽ học được gì

Xây dựng các dự án FastAPI từ đầu với cấu trúc module hóa và các API router được tổ chức rõ ràng, phù hợp cho ứng dụng có khả năng mở rộng.
Xử lý path & query parameters, request bodies, headers, và vận hành web server hiệu quả.
Phát triển CRUD REST API với validation, response models, xử lý ngoại lệ, và thao tác bất đồng bộ bằng SQLModel.
Triển khai xác thực JWT, refresh tokens, HTTP Bearer Auth, và thu hồi token bằng Redis.
Tạo tài khoản người dùng, kích hoạt xác minh email, đặt lại mật khẩu và kiểm soát truy cập dựa trên vai trò (RBAC) an toàn.
Quản lý tác vụ nền với FastAPI và Celery + Redis, bao gồm giám sát và xử lý tác vụ bất đồng bộ.
Viết tài liệu API chuyên nghiệp với SwaggerUI và Redoc, đồng thời thực hiện kiểm thử đơn vị & tích hợp với Pytest, Mock, Schemathesis.
Triển khai ứng dụng FastAPI sẵn sàng cho sản xuất với PostgreSQL, Celery, Redis và các nền tảng đám mây.

Yêu cầu

Kiến thức Python cơ bản (biến, hàm, vòng lặp, list, dict).
Hiểu biết về khái niệm REST API là một lợi thế, nhưng không bắt buộc.
Sẵn sàng học về cơ sở dữ liệu, thao tác bất đồng bộ, xác thực JWT và những kiến thức nền tảng về FastAPI.

Đối tượng phù hợp

Lập trình viên backend muốn làm chủ FastAPI và xây dựng API sẵn sàng cho sản xuất.
Lập trình viên Python muốn nâng cao kỹ năng phát triển web.
Người mới bắt đầu có kiến thức Python cơ bản, muốn học các framework API hiện đại.
Chuyên gia CNTT muốn triển khai xác thực JWT và RBAC.
Lập trình viên quan tâm đến cơ sở dữ liệu bất đồng bộ với SQLModel và dependency injection.
Bất kỳ ai muốn xử lý tác vụ nền với Celery và Redis.
Lập trình viên muốn kiểm thử API bằng Pytest, Unittest Mock và Schemathesis.
Lập trình viên muốn triển khai ứng dụng FastAPI an toàn, có khả năng mở rộng lên môi trường sản xuất.

Nội dung khóa học

10 phần • 25 bài giảng
1 Giới thiệu và Thiết lập dự án (Phần 1)
2 Cơ bản về Web Server: Path & Query Params, Request Body, Headers (Phần 2)
3 Xây dựng CRUD REST API: Response Models, Validation và Exceptions (Phần 3)
4 Cấu trúc dự án dạng module với FastAPI Routers (Phần 4)
1 Cơ sở dữ liệu với SQLModel: Kết nối, Lifespan Events và Models (Phần 5)
2 CRUD với Async SQLModel: Giới thiệu về Dependency Injection (Phần 6)
3 Tạo User Authentication Model (Database Migrations với Alembic) (Phần 7)
4 Tạo tài khoản người dùng: Email & Mật khẩu (Phần 8)
1 Xác thực JWT: Tạo Access và Refresh Tokens (Phần 9)
2 Xác thực JWT: Bảo vệ Endpoint với HTTP Bearer Auth (Phần 10)
3 Xác thực JWT: Gia hạn quyền truy cập người dùng bằng Refresh Tokens (Phần 11)
4 Xác thực JWT: Thu hồi Access Tokens bằng Redis (Phần 12)
5 Kiểm soát truy cập dựa trên vai trò (RBAC) bằng Dependency Injection (Phần 13)
1 Quan hệ Model và Schema: One-to-Many SQLModel (Phần 14)
2 Thêm quan hệ Cơ sở dữ liệu và Schema (Phần 15)
1 Xử lý lỗi: Custom API Exceptions (Phần 16)
2 Middleware: Custom Logging và CORS (Phần 17)
1 Xác minh tài khoản người dùng qua Email (Phần 18)
2 Xử lý đặt lại mật khẩu (Phần 19)
1 Tác vụ nền với FastAPI và Celery + Redis (Phần 20)
1 Tài liệu API với Swagger và Redoc (Phần 21)
2 Kiểm thử API với Unittest Mock, Pytest & Schemathesis (Phần 22)
1 Triển khai FastAPI, PostgreSQL, Celery & Redis (Phần 23)
2 Kiểm thử ứng dụng FastAPI với Pytest
1 Xây dựng REST API với FastAPI NoSQL Development bằng MongoDB & Beanie

Giới thiệu khóa học

Learn how to build, secure, test, and deploy FastAPI applications from scratch! FastAPI is one of the fastest-growing Python frameworks for building high-performance APIs, and mastering it will take your backend development skills to the next level.

This course is designed for beginners and experienced developers alike. Whether you have some experience with Python and APIs or are starting from zero, I will guide you step by step through every concept, making complex topics easy to understand and immediately applicable. Every lecture is hands-on, ensuring you learn by doing, and focuses on creating production-ready, secure, and scalable applications.

You will start with project setup and web server fundamentals, learning how to handle path and query parameters, request bodies, headers, and run your FastAPI server efficiently. You’ll organize your API using FastAPI routers and modular project structure for maintainability.

Dive into databases using SQLModel, including asynchronous CRUD operations, dependency injection, database connection management with lifespan events, and advanced model and schema relationships. You’ll also learn database migrations using Alembic to manage production-ready databases.

Security is a core focus of this course. You will implement JWT authentication with access and refresh tokens, protect endpoints with HTTP Bearer Auth, handle token revocation using Redis, and apply role-based access control (RBAC) to manage user permissions efficiently. Additionally, you’ll build full user account functionality including email verification, password resets, and secure account creation.

Learn how to implement background tasks and asynchronous processing using FastAPI Background Tasks and Celery with Redis, along with monitoring Celery tasks using Flower. Build professional middleware, custom logging, and configure CORS and trusted hosts for robust applications.

You will also master API documentation with SwaggerUI and Redoc, ensuring your APIs are well-documented and developer-friendly. Testing is a key component: gain hands-on experience with unit and integration tests using Pytest, Unittest Mock, and document-driven testing with Schemathesis.

Finally, you’ll deploy your FastAPI application to production environments with PostgreSQL, Celery, Redis, and cloud platforms, creating a fully deployable, real-world application ready for users.

By the end of this course, you will have mastered the complete FastAPI workflow, from project setup to advanced authentication, database management, background processing, testing, and production deployment. These skills are in high demand and can help you advance your career, secure freelance projects, or build your own production-ready applications.

Topics and practical features covered in this course include:

  • FastAPI project setup and modular structure

  • Web server basics: path & query parameters, request bodies, headers

  • Running FastAPI CLI, choosing HTTP clients, and server management

  • CRUD REST API development with response models, validation, and exception handling

  • Organizing API paths with routers for scalable architecture

  • Databases with SQLModel: async setup, connection management, table creation, CRUD operations

  • Dependency injection for service classes and path handlers

  • User authentication models, database migrations with Alembic

  • User account creation: email, password, and secure endpoints

  • JWT authentication: access & refresh tokens, HTTP Bearer Auth, token renewal, and revocation

  • Role-Based Access Control (RBAC) and managing user roles

  • Advanced model and schema relationships (one-to-many, multiple relationships)

  • Error handling, custom API exceptions, and registering exception handlers

  • Middleware: custom logging, ASGI middleware, CORS configuration, trusted hosts

  • Email integration: FastAPI-Mail setup, sending emails, user account verification

  • Password reset flows and secure handling

  • Background tasks with FastAPI and Celery + Redis

  • Celery monitoring using Flower

  • API documentation with SwaggerUI and Redoc

  • API testing with Pytest, Unittest Mock, and Schemathesis

  • Deployment to production with PostgreSQL, Celery, Redis, and cloud platforms

All lectures are hands-on with full source code, and each topic is demonstrated step by step, ensuring you learn by building real-world applications. This course provides everything you need to become a confident, professional FastAPI developer.

Khóa học liên quan

Khám phá thêm các khoá học cùng chủ đề

Hiển thị tất cả khoá học Fastapi
Hiển thị tất cả khoá học Python
Hiển thị tất cả khoá học Web Frameworks
Zalo
Tôi có thể tư vấn khoá học cho bạn 😊