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.
- 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
- 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.
- 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.
- Python 3.13.3+
- External Libraries- fastapi and uvicorn
- To install these libraries, use the command line :- pip install fastapi uvicorn