Skip to content

ZAHERKRYEM/FastApi_Todo

Repository files navigation

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
  1. Activate the Virtual Environment:

    • On Windows:
      venv\Scripts\activate
    • On macOS/Linux:
      source venv/bin/activate
  2. Clone the Repository:

    git clone https://github.com/ZAHERKRYEM/FastApi_Todo.git
  3. Navigate to the Project Folder:

    cd FastApi_Todo
  4. Install the Dependencies:

    pip install -r requirements.txt

Usage

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

Endpoints

  • 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}

Demo

A demo of the application is available in the following video:

  • todo.mp4

Postman Collection

You can import the Postman collection to test the API endpoints:

  • Todo.postman_collection.json

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages