This is Covid-19 Backend app for getting covid-19 data.
- Install python 3.6 or above.
- Create virtualenv with following command(replace python version as per your system).
virtualenv covid-app --python=python3.6 - Now activate the virtual env and run following command to install the libraries.
source covid-app/bin/activatepip install -r requirements.txt - Now Create the Database for covid app in mysql using following command.
create database covid_app - Now replace the username and password of database into env_var.env file like following.
mysql+pymysql://username:password@localhost/covid_app - Now We need to export the environment variables to the system using following command.
source env_var.env - Now we need to create the default tables use following command to create it.
alembic upgrade head - We are done with the pre steps for the setting up the project now run the following
command to start the application.
python app.py - To send the mail report you will need to add the username and password in the config. And also enable the less secure app enable in your google account.
-
Login API (POST) http://0.0.0.0:5007/api/v1/login
-
Signup API (POST) http://0.0.0.0:5007/api/v1/signup
-
Get Covid Data API (POST) http://0.0.0.0:5007/api/v1/covid
-
Get Covid Report on Mail (GET) http://0.0.0.0:5007/api/v1/covid/report