
Learn to build web applications with fast api, and set up a project with a virtual environment, install fast api, and verify the first api application.
Build a FastAPI web server by creating a main app, defining get and post endpoints with path and query parameters, and validating request bodies and headers with Pydantic models.
Build a CRUD rest API for books with create, read, update, and delete operations in an in-memory store, using FastAPI, Pydantic models, response models, and error handling.
Learn to modularize a FastAPI app by creating API routers, moving book data and schemas into a books package, and exposing endpoints under a versioned /api/v1/books prefix.
Use sqlmodel with PostgreSQL to replace in-memory data; set up neon or PostgreSQL, configure env vars, and implement an engine, lifespan events, and a uuid book model with timestamps.
Learn to implement a complete async CRUD service with SQLModel in FastAPI, including dependency injection of an async session, a dedicated book service, and create, read, update, delete operations.
Set up a user authentication model with SQLModel, add uuid, username, email, and is_verified fields, and manage migrations with Alembic to create the users table.
Create a FastAPI user signup flow by building an auth router, defining signup schemas, hashing passwords with a util, migrating with Alembic, and wiring a user service with dependency injection.
Learn to implement jwt authentication in FastAPI by creating access and refresh tokens, encoding user claims, and validating tokens for protected endpoints.
Protect endpoints with HTTP bearer authentication in FastAPI by creating an access token bearer dependency, decoding and validating JWT tokens, and returning user details for authorized requests.
Learn how to renew a user's access token with refresh tokens in a FastAPI JWT setup, including token pair and a refresh endpoint that issues a new access token.
This lecture demonstrates revoking tokens on the server side using Redis as a token blacklist. It implements a logout endpoint that adds the token's JWT id to the Redis block list, rendering the token invalid and requiring a new token.
Explore role-based access control in a simple FastAPI app by implementing admin and user roles with permissions, using dependency injection and a role checker to guard endpoints.
Explore one-to-many relationships with SQLModel by linking users to submitted books, using a foreign key and relationship attributes to serialize and expose related data through API endpoints.
Expand one-to-many relationships among users, books, and reviews. Fix serialization with a user books model and add a reviews table via Alembic; expose a review API returning books with reviews.
Learn to implement custom error handling in FastAPI by creating an errors module with application-specific exceptions and attaching handlers to return detailed, consistent error responses.
Learn to implement FastAPI middleware, including custom http logging and cors via asgi middleware, and attach authorization checks and error handling to requests and responses.
Implement email verification and password resets in a FastAPI app by sending verification emails with a mail module, generating and decoding url-safe tokens using itsdangerous, and updating user is_verified.
Implement an email-based password reset flow with a password reset request and a password reset confirm endpoint, using tokenized links and account verification checks before accessing protected endpoints.
learn how to offload long tasks with fastapi background tasks and celery using redis as the broker, including sending emails for verification and password resets, and monitor with flower.
Document your FastAPI with OpenAPI specification using Swagger and Redoc, automatically generating clear documentation from defined endpoints and Pydantic models.
Learn to implement automated api testing using unittest mock, pytest, and Schemathesis, including dependency overrides, fixtures, test clients, and OpenAPI driven test generation.
Deploy a FastAPI web service with a PostgreSQL database, Redis as broker, and Celery workers on Render, configuring environment variables, migrations with Alembic, and a Redis-backed task queue.
Create effective integration tests for FastAPI apps using pytest, the FastAPI test client, fixtures, and dependency overrides to test endpoints, data validation, and database interactions.
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.