Here's an updated version of the README.md
file that includes instructions for creating a virtual environment and installing the necessary libraries:
# Todo API with FastAPI
This project is a Todo API built with FastAPI, allowing users to register accounts, log in, and manage their todo lists.
## Features
- User registration
- User login and access token generation
- Create, read, update, and delete todo items
- Protected endpoints using OAuth2
## Requirements
- Python 3.12.6
## Installation
To install the project, follow these steps:
1. **Create a Virtual Environment:**
```bash
python -m venv venv
-
Activate the Virtual Environment:
- On Windows:
venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
- On Windows:
-
Clone the Repository:
git clone https://github.com/ZAHERKRYEM/FastApi_Todo.git
-
Navigate to the Project Folder:
cd FastApi_Todo
-
Install the Dependencies:
pip install -r requirements.txt
To run the application, use the following command:
uvicorn main:app --reload
You can access the interactive API documentation (Swagger UI) at:
http://127.0.0.1:8000/docs
-
User Registration:
POST /register/
-
User Login:
POST /token
-
Create a New Todo Item:
POST /todos/
-
Read All Todo Items:
GET /todos/
-
Read a Specific Todo Item:
GET /todos/{todo_id}
-
Update a Specific Todo Item:
PUT /todos/{todo_id}
-
Delete a Specific Todo Item:
DELETE /todos/{todo_id}
A demo of the application is available in the following video:
- todo.mp4
You can import the Postman collection to test the API endpoints:
- Todo.postman_collection.json