The code in this repository is primarily for demonstration purposes and not intended for real usage, as it has not been containerized.
- Python version: 3.13
- PostgreSQL version: 12
- Environment tested: Local installation
-
Create a user named
recommender
with no password:CREATE USER recommender;
-
Create a database named recommender:
CREATE DATABASE recommender;
-
Grant all privileges on the database recommender to the user recommender:
GRANT ALL PRIVILEGES ON DATABASE recommender TO recommender;
- Create a virtual environment:
python3 -m venv myenv
- Activate the virtual environment:
source myenv/bin/activate
- Install all necessary libraries:
pip3 install -r requirements.txt
-
In the virtual environment, start the server using Uvicorn:
uvicorn main:app --reload
-
In the virtual environment, load the data:
python3 -m load_data
- In the virtual environment, execute the tests:
pytest -s test_api.py