In order to run the app in vscode, run the following commands:
python3 -m venv venvto setup a python virtual environment.- For Windows:
./venv/Scripts/activateto run the venv. - For MacOS/Linux
. /venv/bin/activateto run the venv
Sidenote: To exit out of the venv, type deactivate.
To install all dependencies do pip install -r requirements.txt
To install a python package do pip install <package_name>
Install the following packages inside the venv:
flaskflask-pymongodnspythonpython-dotenvflask-wtfemail_validatorcertifibcryptrequestsbson
Or install them in one command with pip install flask flask-pymongo dnspython python-dotenv flask-wtf email_validator certifi bcrypt.
flask run to run the app while the venv is active
Note: Always run the command after doing .venv/<Scripts or bin>/activate