Skip to content

ikp4success/shopasource

Repository files navigation

SHOP A SOURCE

Code style: black pre-commit isort bandit

Website

API

https://github.com/ikp4success/shopasource/blob/master/api.md

About

Shop A Source provide easy access to search multiple shopping websites via one source. Website users can manage products and decide what product is best. Shop A Source could also be used to compare prices of a product.

Screenshots

s1 s2 s3

Hybrid of: https://github.com/ikp4success/bestlows-java

Python Version: 3.8+

Setup

$ make .venv
$ make clean # cleans virtual environment folder

Setup virtual environment

Pre-commit

pre-commit installed automatically via .venv, used for linting best practices.

$ make pre-commit

Settings

  • Update values in configs/dev for dev environment and deploy's.
  • A template dev.json.template is provided to setup a dev.json config files.
  • Use debug.json for debugging and testing.
  • dev.json is git-ignored to protect sensitive keys.
run flask project
$ make run STAGE=debug or make run  # debug is default

$ make run STAGE=dev # dev runs
setup docker db for debug runs

Assumes docker is installed on machine.

$ make run_db
$ make clean_db
$ make stop_db

$ make load_db # psql interactive db shell
run flask project in docker
$ make run_docker  # debug is default
# make sure db is running or ..
$ make run_db && make run_docker
run individual spider
$ make run_spider SPIDER=AMAZON SEARCH_KEYWORD=shirts
deploys

project currently runs on Heroku, you can setup your own app-instance and deploy. for more information go to https://devcenter.heroku.com/articles/git. You could also use another service to host the project.

other
$ make generate_key

Author