A minimal Flask-based “todo list” web application demonstrating basic routing, templating, and in-memory data storage.
- List existing todos
- Add new todos via HTML form
- Delete todos
- Python 3.7 or newer
pippackage manager
-
Clone the repository:
git clone https://github.com/yourusername/todoapp.git cd todoapp -
(Optional) Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate -
Install dependencies:
pip install -r requirements.txt
No additional configuration is required. For production use, consider:
- Disabling debug mode
- Using a persistent datastore (e.g. SQLite, PostgreSQL)
- Serving static assets via a CDN or web server
-
Start the development server:
python app.py
-
Open your browser at
http://localhost:5000/
todoapp/
├── app.py # Application entry point
├── requirements.txt # Python dependencies
└── templates/
└── index.html # Jinja2 template for main page
- Persistent storage: Replace the in-memory list with a database model (Flask-SQLAlchemy).
- User sessions: Add user authentication to support multiple users.
- API: Expose REST endpoints for client-side frameworks or mobile apps.