Skip to content

Alvi24-hub/RestAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

To-Do RestAPI Using FastAPI


This is a simple, fully functional To‑Do List REST API built using FastAPI. It supports basic CRUD operations such as creating, reading, updating, and deleting to‑do items. The API uses Pydantic models for validation and HTTPException handling for robust error reporting.


Features

  • Add new to‑do tasks
  • Retrieve a specific task by ID
  • List all tasks or limit how many to return
  • Update any part of an existing task
  • Delete a specific task or clear the entire list
  • Enum-based priority and status handling

How To Run

  • Ensure that Python 3.10+ is installed on your system.
  • Create a virtual environment.(Recommended)
  • Install FastAPI and Uvicorn.
  • Save the api code and name the file 'main.py'.
  • Use Uvicorn to start the development server using the command line :- uvicorn main:app --reload
  • Once the server is running, open your browser and navigate to http://localhost:8000/docs (Swagger UI).
  • Press Ctrl + C in the terminal to stop the FastAPI server.

Example Output

alt text alt text


Additional Features I Plan On Adding

  • Replace the in-memory list with a database (like SQLite or PostgreSQL) using SQLAlchemy
  • Add secure login/signup routes using OAuth2 with JWT tokens for user-based task management.
  • Allow users to assign categories or tags to their tasks for better organization and filtering.
  • Add optional due dates and possibly integrate a reminder feature for time-sensitive tasks.
  • Implement more descriptive and structured error responses.
  • Build a frontend using HTML to interact with the API visually.

Requirements

  • Python 3.13.3+
  • External Libraries- fastapi and uvicorn
  • To install these libraries, use the command line :- pip install fastapi uvicorn

About

A simple FastAPI project for managing to-do tasks with full CRUD support.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages