Super simple todo app built in Python.
The instructions in this README file assume you are running the application on an Ubuntu or Debian machine.
First, install pip:
sudo apt update
sudo apt install python3 python3-pip -yInstall the pip requirements (make sure you're in the repo root directory):
pip3 install -r requirements.txtYou need to set the database URI that the app needs to connect to and a secret key. This is done via environment variables.
export DATABASE_URI=[YOUR_DB_URI]
export SECRET_KEY=[YOUR_SECRET_KEY]The secret key can be any value.
The Database URI can be set to an in-memory database using SQLite:
export DATABASE_URI=sqlite:///data.dbYou will also need to run the create.py python script to generate the database schema.
python3 create.pySimply enter the following in your bash terminal:
python3 app.pyThe website will be accessible on port 5000 on your machine's IP.
Make sure the machine's firewall rules allow network traffic on port 5000.
To stop the application, enter ctrl+C.
Make sure the current working directory is this repository.
Install pytest:
sudo apt update
sudo apt install python3 python3-pip -y
pip3 install pytest pytest-covRun pytest and generate test and coverage reports:
python3 -m pytest --doctest-modules --junitxml=junit/test-results.xml --cov=application --cov-report=xml --cov-report=htmlThis will generate reports that are readable by JUnit and Cobertura.
Look at this fork... in hell!