This project is a simple TODO list application built with a Python backend using FastAPI, and a frontend using HTML, CSS, and JavaScript. It allows users to create, read, update, and delete (CRUD) tasks, with the backend handling data storage and the frontend providing a user-friendly interface.
git clone https://github.com/chinnanj666/To-do-List-Using-fullstack-python.git
cd Your-Folder
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install fastapi uvicorn pydantic
uvicorn main:app --reload
http://127.0.0.1:8000
http://127.0.0.1:8000/docs
cd todo-frontend
index.html
, styles.css
, and script.js
files in the todo-frontend
directorypython -m http.server 8080
http://localhost:8080
todo-list/
├── todo-backend/
│ ├── main.py # FastAPI backend entry point
│ ├── models.py # Pydantic models for task data
│ ├── database.py
| └── requirements.txt # Database setup and connection (e.g., SQLite)
├── todo-frontend/
│ ├── src # Main HTML file
│ ├── index.css # CSS for styling
| ├── App.js # JavaScript for frontend logic
│ ├── index.js # Root connection
├── README.md # This file
# Python dependencies
uvicorn main:app --reload
http://localhost:8080
in your browserGET /tasks
: List all tasksPOST /tasks
: Create a new taskPUT /tasks/{id}
: Update a task by IDDELETE /tasks/{id}
: Delete a task by IDcurl -X POST "http://127.0.0.1:8000/tasks" -H "Content-Type: application/json" -d '{"title": "Buy groceries", "description": "Milk, bread, eggs", "completed": false}'
todo-backend/main.py
to add new endpoints or logictodo-frontend/script.js
for API calls, styles.css
for designtodo-backend/database.py
for your preferred storage (e.g., PostgreSQL)git checkout -b feature/new-feature
)git commit -m "Add new feature"
)git push origin feature/new-feature
)This project is licensed under the MIT License. See the LICENSE
file for details.