Welcome to the DBP Uncovered Tool.
Please follow the instructions below to set up the platform on Ubuntu. A similar setup works on Mac adn Windows.
- Python 3.10 (or newer, Python 3.x compatible)
- MySQL installed locally or accessible remotely (Instructions are given for mysql installtion)
MySQL is required to store user responses in the database.
# Install MySQL server
sudo apt install mysql-server
# Install MySQL client libraries
sudo apt install libmysqlclient-dev
# Install build tools and Python headers
sudo apt install -y build-essential pkg-config python3-dev default-libmysqlclient-dev# Install venv if not already installed
sudo apt install python3-venv
# Create a virtual environment
python3 -m venv <your-env-name>
# Activate the environment
source <your-env-name>/bin/activate
# Install project dependencies
pip install -r requirements.txt# Inside MySQL shell, run:
CREATE DATABASE <db_name>;
CREATE USER '<username>'@'localhost' IDENTIFIED BY '<password>';
GRANT ALL PRIVILEGES ON <db_name>.* TO '<username>'@'localhost';
FLUSH PRIVILEGES;# From the project root, run:
mysql -u <username> -p <db_name> < create_db.sqlnano .envDB_HOST=localhost
DB_PORT=3306
DB_USER=<username>
DB_PASSWORD=<password>
DB_NAME=<db_name>
SECRET_KEY="<your-secure-secret-key>"#From project root, run the following.
python3 app.py