FastAPI Certification Table of Contents

Table of Content


Course Introduction

  • What is an API?
  • What is REST?

Working with FastAPI

  • Introduction to this section
  • Your First FastAPI App
  • Initial App Setup
  • Linting, formatting and sorting imports
  • Our social media API: adding posts
  • Splitting our API into files with APIRouter
  • Adding comments to the social medical API

Introduction to pytest

  • Introduction to the pytest section
  • The basics of pytest
  • Getting started with FastAPI tests
  • Creating posts in our tests
  • Adding tests for posts
  • Adding comments tests

Working with async databases

  • Introduction to working with databases
  • Installing requirements for async databases in FastAPI
  • Creating a config file using Pydantic
  • Different configurations per environment in
  • Config caching and how to get the config object
  • Async database setup with FastAPI
  • Database connection with lifespan events in FastAPI
  • Run your FastAPI test in 'test' mode
  • Using a database in our FastAPI router

Logging in FastAPI applications

  • Introduction to logging
  • Python logging: loggers, handlers, and formatters
  • Logger hierarchies and __name__
  • Adding Logging Configuration for FastAPI Applications
  • How to configure multiple loggers in the logging module
  • Adding File Handlers for Saving Logs
  • Add logging to your FastAPI endpoints
  • Python logging: filters and custom filters
  • Logging HTTPExceptions with an Exception Handler
  • Identifying logs from the same request: Correlation ID
  • Adding JSON-formatted log files
  • Obfuscating email addresses in logs using a custom filter
  • Adding Logtail for Cloud Logging in FastAPI
  • Enabling Logtail in only in production

User authentication with FastAPI

  • Introduction to user authentication
  • Installing requirements and, what are JWTs?
  • Adding a users table and retrieving users by email
  • Adding user registration and tests
  • Adding tests for the user registration endpoint
  • How to hash passwords with passlib
  • Generate the access token
  • Retrieve the current user with their token
  • Use the current user in the API router
  • Dependency injection: getting the user
  • Adding user relationships to other tables

Many-to-many relationships

  • Adding a table for post likes
  • Adding an API route to like posts
  • Extracting reusable queries with SQLAlchemy
  • Query string arguments and data sorting with Enum

User email confirmation

  • Creating the confirmation token
  • Decoding the confirmation token
  • Adding a user confirmation endpoint
  • Requiring user confirmation for authenticated requests
  • Mailgun set-up and configuration
  • Sending emails and testing with Python
  • Sending a confirmation email on registration
  • Sending emails with background tasks

File Uploads with FastAPI

  • Our configuration for Backblaze B2
  • Internal library for Backblaze B2
  • Writing our file upload endpoint
  • Writing tests for file upload

Background Tasks for Image Generation

  • Model and database changes for image generation
  • Configuration for DeepAI, our third party service
  • Generating images using background tasks
  • Executing image generation in our FastAPI endpoint

FastAPI Deployments and Application Management

  • Updating our project to Pydantic v2
  • Deploy a FastAPI app to Render
  • Add a free PostgreSQL database to your FastAPI app
  • Error management with Sentry for FastAPI apps
  • Continuous Integration with GitHub Actions for Python apps

Apply for Certification

 For Support