Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Coursera

Intermediate Backend Development with FastAPI

Packt via Coursera

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
This course features Coursera Coach! A smarter way to learn with interactive, real-time conversations that help you test your knowledge, challenge assumptions, and deepen your understanding as you progress through the course. In this intermediate-level course, you will learn advanced concepts of backend development using FastAPI. Starting from user authentication with OAuth2 and JWT, to handling complex database relationships, you will gain practical experience with modern techniques for building secure and scalable APIs. The course focuses on essential topics such as user registration, login and logout mechanisms, as well as integrating external services like email and SMS for notifications. The course is structured to guide you through real-world backend tasks, starting with setting up secure user authentication using JWT and OAuth2, followed by integrating advanced database models and managing user sessions. You'll also explore background task management with Celery and handle many-to-many relationships using SQLModel, among other essential backend skills. This course is designed for developers who already have a basic understanding of backend development and FastAPI and wish to deepen their skills. You should be familiar with Python, REST APIs, and the core concepts of web development. No strict prerequisites, but prior experience with FastAPI is recommended. By the end of the course, you will be able to build complex user authentication systems, manage dynamic databases with FastAPI, integrate third-party services for email/SMS, and handle real-world application challenges such as error management and background task execution.

Syllabus

  • Register User
    • In this module, we will guide you through the user registration process in FastAPI. You will learn how to create a seller model, implement a signup endpoint, and securely store user passwords using hashing. Additionally, we’ll cover the architecture for handling user registration in a scalable way.
  • Login User
    • In this module, we will cover the complete login process in FastAPI using OAuth2 and JWT. You will learn how to manage secure user authentication, create login forms, and decode JWT tokens to identify users. This section also explores integrating external authentication providers.
  • Logout User
    • In this module, we will explore how to implement a secure logout system in FastAPI. You'll learn to invalidate tokens, use Redis for session management, and add a blacklist to prevent reuse of expired tokens. These techniques ensure secure session management in your app.
  • SQL Relations
    • In this module, we dive into SQL relationships and relational database design. You will learn how to define foreign keys, use UUIDs for primary keys, and structure your database to create meaningful relationships between entities. Additionally, we’ll explore techniques for debugging SQL queries and ensuring data integrity.
  • Alembic: Database Migrations
    • In this module, we will show you how to manage database schema changes using Alembic. You’ll learn to configure Alembic, create migration scripts, and use autogeneration to simplify the database update process. These skills are essential for maintaining version control over your database schema.
  • Delivery Partner
    • In this module, you’ll learn how to integrate delivery partner functionality into your FastAPI application. We’ll cover everything from creating a delivery partner model in your database to managing partner data through API endpoints and a service layer. You’ll also gain troubleshooting tips for common integration issues.
  • Shipment Event
    • In this module, we will explore shipment events and how to build an event-driven system for tracking shipments. You’ll create an event model, structure a service layer for shipment logic, and implement a system to manage and cancel shipment events. Learn how to debug and optimize shipment event endpoints as well.
  • Send Mail
    • In this module, we will show you how to integrate email notifications in your FastAPI application. You will learn how to configure an email client, send asynchronous emails using background tasks, and create dynamic email templates to keep your users informed. This section is crucial for apps requiring communication like shipment notifications.
  • Custom Response
    • In this module, you’ll learn how to return custom responses, including HTML pages and dynamic content, from your FastAPI API. We’ll cover how to use templates for generating HTML responses and how to fine-tune your API response format to meet specific client needs.
  • Email Confirmation
    • In this module, we will teach you how to implement an email confirmation system in FastAPI. You’ll learn how to securely generate confirmation tokens, send registration emails, and create verification endpoints to handle the process of confirming user email addresses.
  • Password Reset
    • In this module, we will guide you through creating a password reset feature in FastAPI. You will learn how to handle the reset process through secure links, validate new passwords, and update user credentials to help users regain access to their accounts securely.
  • SMS
    • In this module, we’ll teach you how to integrate SMS services like Twilio into your FastAPI app. You’ll learn to send SMS notifications, handle user verifications via SMS codes, and set up Twilio for efficient communication with users, improving authentication and notification systems.
  • Review
    • In this module, you’ll learn how to integrate a review system into your FastAPI application. You’ll define a review model, create review links, and manage user feedback through API endpoints, enabling a user-driven evaluation of your services or products.
  • Celery
    • In this module, you will explore the Celery task queue and how to integrate it into your FastAPI app to handle background tasks. You’ll set up workers, define tasks, and use Flower to monitor and manage asynchronous tasks, ensuring that your app remains responsive.
  • Many to Many
    • In this module, we will explore many-to-many relationships in FastAPI, using SQLModel to model complex relationships between entities. You’ll learn how to manage links, use tags for filtering data, and effectively query many-to-many relationships for better data management.
  • Error Handling
    • In this module, we will cover how to manage exceptions and errors in FastAPI. You will learn how to handle common exceptions, add custom handlers, and integrate non-standard exceptions to improve the robustness and reliability of your API.

Taught by

Packt - Course Instructors

Reviews

Start your review of Intermediate Backend Development with FastAPI

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.