Embark on an immersive journey to master the art of building and deploying REST APIs with FastAPI. This comprehensive course will equip you with the knowledge and skills to create efficient, high-performance APIs that leverage the latest industry practices. Learn how to integrate asynchronous databases, implement user authentication, and manage application logging to ensure secure and scalable API solutions.
![Packt](https://d3njjcbhbojbot.cloudfront.net/api/utilities/v1/imageproxy/http://coursera-university-assets.s3.amazonaws.com/fa/3b9b5304c24cf4aa64054631ee946c/360-360-square.png?auto=format%2Ccompress&dpr=1&w=28&h=28)
![](https://d3njjcbhbojbot.cloudfront.net/api/utilities/v1/imageproxy/https://coursera_assets.s3.amazonaws.com/images/1a4589dccee10648821b7ea23e5fca9a.png?auto=format%2Ccompress&dpr=1&q=80)
![Packt](https://d3njjcbhbojbot.cloudfront.net/api/utilities/v1/imageproxy/http://coursera-university-assets.s3.amazonaws.com/c7/391d0e5f6a4d648dc4f754c5898df7/2.png?auto=format%2Ccompress&dpr=1&h=45)
Recommended experience
What you'll learn
Build RESTful APIs with FastAPI, integrating advanced features like user authentication and async databases.
Implement comprehensive logging, testing, and debugging practices for secure and maintainable applications.
Leverage FastAPI features like background tasks for image generation and email processing.
Deploy applications to platforms like Render with continuous integration pipelines.
Details to know
![](https://d3njjcbhbojbot.cloudfront.net/api/utilities/v1/imageproxy/https://coursera_assets.s3.amazonaws.com/images/31ebcba3851b87d1d8609abf15d0ff7e.png?auto=format%2Ccompress&dpr=1&w=24&h=24)
Add to your LinkedIn profile
February 2025
11 assignments
See how employees at top companies are mastering in-demand skills
![Placeholder](https://d3njjcbhbojbot.cloudfront.net/api/utilities/v1/imageproxy/https://coursera_assets.s3.amazonaws.com/images/74c8747e8210831049cf88dd4eefe26c.png?auto=format%2Ccompress&dpr=2&blur=200&px=8&max-w=320)
![Placeholder](https://d3njjcbhbojbot.cloudfront.net/api/utilities/v1/imageproxy/https://coursera_assets.s3.amazonaws.com/images/de1a6556fbe605411e8c1c2ca4ba45f1.png?auto=format%2Ccompress&dpr=2&blur=200&px=8&max-w=259)
Earn a career certificate
Add this credential to your LinkedIn profile, resume, or CV
Share it on social media and in your performance review
![Placeholder](https://d3njjcbhbojbot.cloudfront.net/api/utilities/v1/imageproxy/https://coursera_assets.s3.amazonaws.com/images/de1a6556fbe605411e8c1c2ca4ba45f1.png?auto=format%2Ccompress&dpr=2&blur=200&px=8&max-w=333)
There are 11 modules in this course
In this module, we will lay the foundation for your journey into mastering REST APIs with FastAPI. You will explore the importance of community in software development, gain clarity on what to expect from this course, and dive into the core concepts of APIs and REST, setting the stage for the practical lessons ahead.
What's included
4 videos1 reading
In this module, we will dive into the essentials of working with FastAPI, starting with creating your first application. You will learn how to configure a clean and maintainable setup, follow best practices for code formatting, and implement core features of a social media API. By the end of this section, you will also know how to manage a scalable codebase using APIRouter for modular development.
What's included
7 videos1 assignment
In this module, we will explore pytest, a robust testing framework for Python. You will start with its basics and then focus on writing and implementing tests for your FastAPI applications. By the end of this section, you will have built a suite of tests to ensure the reliability of the posts and comments features in your API, laying the groundwork for quality assurance in your projects.
What's included
6 videos1 assignment
In this module, we will delve into the integration of asynchronous databases with FastAPI. You will learn how to install necessary dependencies, create configuration files using Pydantic, and manage multiple environments. Additionally, you will set up an async database, handle connections using lifespan events, and integrate database operations into your API routers to enable seamless data persistence.
What's included
9 videos1 assignment
In this module, we will focus on implementing robust logging mechanisms in FastAPI applications. You will explore Python’s logging framework, configure multiple loggers, and add file handlers to persist logs. Advanced techniques like using filters, obfuscating sensitive data, and implementing correlation IDs will also be covered. Additionally, you’ll learn how to integrate and manage cloud-based logging tools like Logtail, enabling efficient monitoring and debugging in production.
What's included
14 videos1 assignment
In this module, we will cover user authentication in FastAPI, from the basics of creating a users table to advanced features like token generation and password hashing. You will implement user registration, retrieve the current user using tokens, and apply dependency injection for streamlined user management. Additionally, the module explores integrating user relationships with other tables and optional features like OAuth Password Bearer and Swagger for secure and well-documented APIs.
What's included
12 videos1 assignment
In this module, we will explore the implementation of many-to-many relationships in FastAPI using SQLAlchemy. You will learn how to set up a table for post likes, create API routes for interacting with posts, and streamline database operations with reusable queries. The module also covers advanced techniques like using query string arguments and Enums to enable data sorting and filtering, enhancing the functionality and user experience of your application.
What's included
4 videos1 assignment
In this module, we will implement user email confirmation in FastAPI. You will learn how to generate and decode confirmation tokens, create a confirmation endpoint, and enforce email verification for authenticated requests. Additionally, the module guides you through setting up Mailgun, sending confirmation emails, and optimizing email delivery using background tasks to ensure a seamless and efficient user experience.
What's included
8 videos1 assignment
In this module, we will focus on enabling file uploads in your FastAPI application. You'll learn how to set up and integrate Backblaze B2 as a file storage solution, implement a dedicated file upload endpoint, and write tests to ensure seamless and secure operation.
What's included
4 videos1 assignment
In this module, you will learn how to implement image generation features in FastAPI using background tasks. You will modify your application’s models and databases, configure DeepAI as a third-party service, and use background tasks to optimize image generation. By the end, you will have fully integrated image generation functionality into your FastAPI endpoints.
What's included
4 videos1 assignment
In this module, you will learn to deploy and manage FastAPI applications effectively. You will update your project to Pydantic v2, deploy your app to Render, and configure a PostgreSQL database. Additionally, the module covers integrating Sentry for error tracking and setting up GitHub Actions for continuous integration, ensuring a streamlined deployment and management process.
What's included
5 videos2 assignments
Instructor
![Packt - Course Instructors](https://d3njjcbhbojbot.cloudfront.net/api/utilities/v1/imageproxy/https://coursera-instructor-photos.s3.amazonaws.com/2b/9c92f373414941b4a0bbda577bd627/profile.jpg?auto=format%2Ccompress&dpr=1&w=75&h=75&fit=crop)
Offered by
Why people choose Coursera for their career
![](https://d3njjcbhbojbot.cloudfront.net/api/utilities/v1/imageproxy/https://coursera_assets.s3.amazonaws.com/growth_testimonials/passionate_learner/Felipe_Moitta.png?auto=format%2Ccompress&dpr=1&w=64&h=64&fit=crop)
![](https://d3njjcbhbojbot.cloudfront.net/api/utilities/v1/imageproxy/https://coursera_assets.s3.amazonaws.com/growth_testimonials/passionate_learner/Jennifer_John.png?auto=format%2Ccompress&dpr=1&w=64&h=64&fit=crop)
![](https://d3njjcbhbojbot.cloudfront.net/api/utilities/v1/imageproxy/https://coursera_assets.s3.amazonaws.com/growth_testimonials/passionate_learner/Larry_Tao_Wang_1.png?auto=format%2Ccompress&dpr=1&w=64&h=64&fit=crop)
![](https://d3njjcbhbojbot.cloudfront.net/api/utilities/v1/imageproxy/https://coursera_assets.s3.amazonaws.com/growth_testimonials/passionate_learner/Chaitanya_Anand.png?auto=format%2Ccompress&dpr=1&w=64&h=64&fit=crop)
New to Software Development? Start here.
![Placeholder](https://d3njjcbhbojbot.cloudfront.net/api/utilities/v1/imageproxy/https://coursera_assets.s3.amazonaws.com/images/7a1c0e2e779c1ff27cae62480adfe003.png?auto=format%2Ccompress&dpr=2&blur=200&px=8&max-w=120)
Open new doors with Coursera Plus
Unlimited access to 10,000+ world-class courses, hands-on projects, and job-ready certificate programs - all included in your subscription
Advance your career with an online degree
Earn a degree from world-class universities - 100% online
Join over 3,400 global companies that choose Coursera for Business
Upskill your employees to excel in the digital economy
Frequently asked questions
Yes, you can preview the first video and view the syllabus before you enroll. You must purchase the course to access content not included in the preview.
If you decide to enroll in the course before the session start date, you will have access to all of the lecture videos and readings for the course. You’ll be able to submit assignments once the session starts.
Once you enroll and your session begins, you will have access to all videos and other resources, including reading items and the course discussion forum. You’ll be able to view and submit practice assessments, and complete required graded assignments to earn a grade and a Course Certificate.