khub-task
Installations:
- Setup a python environment say
.env
and install the requirements
$ pip install -r requirements.txt
Run:
Feeding data into MongoDB
- Head over to folder:
json
- Run the two scripts (Requires MongoDB installation v3.4.* or higher)
$ python script_price_tables.py
$ python commodities.py
If you have auth enabled Mongo, please use the
--uri 'mongodb://<user>:<password>@<host>:<port>'
uri scheme for both scripts, defaults to'mongodb://localhost:27017'
Serving the API
- Head back to root folder
- Serve the API over gunicorn
If you have auth enabled Mongo, please change the host before serving gunicorn, default is
'mongodb://localhost:27017/AGMAPI'
$ gunicorn --bind 0.0.0.0 --reload run:app --log-level=debug