Python 3.8 or higher is recommended PostgreSQL 12 or higher is recommended
Initialize dev environment and install libraries
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.txtCreate .env file based in the .env.default with updated values and load them
cp .env.default .envTake a look to previous file to ensure you have all required configurations.
Prepare your database and user to make connection and update the .env file previously mentioned.
Don't forget about the keys if you want to enable OTP.
Then execute migrations and create database (Ensure to do previous step)
python3 main.py db init
python3 main.py db migrate --message "Initial"
python3 main.py db upgradeIf you want to start from sample user without OTP, run:
python3 main.py seed_userAdd the configuration variables to Alpha Vantage and run:
python3 main.py symbols_alphaIf you want to run tests, please type the following command
python3 main.py testFinally run the project as follow:
python3 main.py runRun linter/Formatter
python3 -m black .This project uses coode best practices, you may find them in pyproject.toml.
To run locally do the following: (Ensure to have the .env file updated)
#Build
docker build -t angyay0/stock-take-home .
#run
docker run --env-file=.env -d -p 81:5001 angyay0/stock-take-homeThis project contains the image building, k8s files is left.
This project includes deployment validations, workflow and more tooling using Github actions, you can fin them inside .github/workflow/ for the current pipeline.
The project is configured with environment secrets.