Flask based API for Vaccine R&D Dashboard
Production: https://c19-vac-rnd-dash-api.herokuapp.com/
Staging: https://c19-vac-rnd-dash-staging-api.herokuapp.com/
See condaenv.yml or Pipfile for minimum installation requirements in your environment
Use the package manager pip to install foobar.
- Get Google Sheets API
credentials.json
from steps below and follow steps below - Add
GMAPS_GEOCODING_API_KEY
Key to.env
conda
orpip install pipenv
pipenv install
to install all dependenciespipenv shell
to activate python virtual environmentpython run.py
and navigate to the localhost endpoint
Install Miniconda
bash
>> conda env create -f condaenv.yml
Start environment with:
bash
>> conda activate covidbe
- Enable Google Sheets API
- Step 1. Enable the Google Sheets API, download the
credentials.json
- Step 2. Download the
credentials.json
- Step 1. Enable the Google Sheets API, download the
- Enable Google Geocoding API
- Generate the API on GCP console
- Add it to the
.env
file. See enviroment variables section
From command line:
>> python run.py
From python shell:
# Not Implemented
Run unittests from application root folder (.../py-api-vac-rnd-dash/) with:
(Requirement Local) >> mkdir .../py-api-vac-rnd-dash/api/instance/logs
(Requirement Local) >> touch .../py-api-vac-rnd-dash/api/instance/logs/debg.log
>> python -m unittests discover
Requires: redis server **May need three or more active terminals to run full server
- Start redis
>> redis-server
- Start worker
>> cd <RootDirectory>
>> python worker.py
- Start Flask Application
>> cd <RootDirectory>
>> python run.py
- Start a command terminal or postman/insomnia instance to send requests to the server at <Default: 127.0.0.1:5000/route>
.env
file can be added to the root folder in order to inject variables.
Variables being used:
GMAPS_GEOCODING_API_KEY=<key>
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.