This project is a web-based To-Do List application that integrates Flask and Streamlit. It allows users to add, view, update, and delete to-do items. The application uses SQLite for data storage.
- Add new to-do items
- View all to-do items
- Update existing to-do items
- Delete to-do items
- Search for to-do items by title
- Flask
- Streamlit
- SQLite
- SQLAlchemy
- Bootstrap (for styling)
- Python 3.7 or higher
pip
package installer
-
Clone the repository:
git clone https://github.com/saloni0212/todo-list-app.git cd todo-list-app
-
Create and activate a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Set up the database:
python
from app import db db.create_all() exit()
-
Run the Flask application:
flask run
-
Run the Streamlit application:
streamlit run app.py
-
Open your web browser and navigate to
http://localhost:8501
to access the Streamlit interface.
-
Create a
Procfile
with the following content:web: sh setup.sh && streamlit run app.py
-
Create a
setup.sh
file with the following content:#!/bin/bash
pip install -r requirements.txt
echo "
[server]
headless = true
port = 8000
enableCORS = false
" > ~/.streamlit/config.toml
```
-
Make the script executable:
chmod +x setup.sh
-
Ensure the
app.run()
line inapp.py
looks like this:if __name__ == "__main__": app.run(host='0.0.0.0', port=8000, debug=True)
-
Push the changes to your GitHub repository.
-
Go to Render and create a new web service, connecting it to your GitHub repository.
-
Configure the service:
- Name: Choose a name for your service.
- Build Command: Leave it empty (Render will use
pip install -r requirements.txt
). - Start Command: Render will use the
Procfile
. - Environment: Set to
Python 3
. - Region: Choose a region close to your users.
-
Click "Create Web Service" to deploy your application.
Navigate to the Streamlit interface at http://localhost:8501
or the URL provided by Render to start using the application.
Contributions are welcome! Please open an issue or submit a pull request for any changes or improvements.