This device is not compatible.

PROJECT


Create a REST API with FastAPI for User Management

In this project, we’ll learn to build a FastAPI based user management system that enables efficient creation, retrieval, updating, and deletion (CRUD) of user data, with strong data validation and authentication capabilities.

Create a REST API with FastAPI for User Management

You will learn to:

Create and integrate SQLAlchemy with FastAPI.

Write models and schemas.

Add an object relational mapping (ORM) layer between classes and databases.

Create endpoints to handle the CRUD operations efficiently.

Skills

Backend Development

API Development

REST API

Web API

Prerequisites

Intermediate knowledge of Python

Intermediate knowledge of SQLAlchemy

Basic understanding of FastAPI

Intermediate knowledge of REST architecture

Technologies

Python

fastapi logo

FastAPI

SQLAlchemy

Project Description

In this project, we’ll create a user management system using FastAPI and SQLAlchemy as object relational mapping (ORM) to handle database operations. SQLAlchemy, a popular Python ORM, will manage the interaction with the database.

The user management system will provide a comprehensive set of API endpoints to allow users to perform everyday tasks such as adding a new user, updating user information, fetching user details, and deleting user accounts.

The user management system will be integrated with a DBMS to allow for seamless storage and retrieval of user data. SQLAlchemy will manage database operations, including creating tables, inserting, updating, and deleting records, and querying the database.

The error-handling mechanisms will be implemented to ensure the reliability and fault tolerance of the API. Also, thorough testing and debugging will be conducted to identify and resolve issues before deployment.

Project Tasks

1

Database Management

Task 0: Get Started

Task 1: Configure the Database

Task 2: Create a Model Class

Task 3: Create a Schema for the Base User

Task 4: Create a Schema for the User Class

Task 5: Fetch the Session to the Main Application

2

Create REST Endpoints

Task 6: Create an Endpoint to Get Users

Task 7: Create an Endpoint to Get Users by ID

Task 8: Create an Endpoint to Get Users by Email

Task 9: Create an Endpoint to Add a User

Task 10: Create an Endpoint to Update a User

Task 11: Create an Endpoint to Delete a User

Congratulations!