Warning
This project requires Python 3.10.0 or higher.
![WARNING] This project requires Docker if you want to run the database locally.
Create a .env file in the root of the project with the following content:
SECRET_KEY="your_secret_key"
JWT_SECRET_KEY="your_jwt_secret"
DB_USER="sa"
DB_NAME="master"
SQLSERVER_PASS="abcDEF123#"
DB_HOST="localhost"
DEBUG="True"
ORIGIN="http://localhost:8080"You can generate a secret key or a jwt secret key by running with Python:
python -c 'import os; print(os.urandom(16))'Then copy the output and paste it in the .env file.
To set up the database, run:
go to the database folder:
cd databasedocker build -t database .Then run the database container:
docker run -d -p 5432:5432 databaseReturn to the root of the project:
cd ..Check your Python version:
python --versionIf you have Python 3.10.0 or higher, you can continue with the setup, otherwise, you need to install the correct version.
To setup a virtual environment, run:
python -m venv venvTo install the dependencies, run:
pip install -r requirements.txtTo start the project, run:
python bookquest/app/__init__.pyTo check lint errors, run:
flake8 bookquest --format=pylint