Skip to content

Latest commit

 

History

History
57 lines (29 loc) · 1.6 KB

README.md

File metadata and controls

57 lines (29 loc) · 1.6 KB

COVID19_SAMPLE_API

COVID19API is a way to get latest info on Covid19 cases

We use celery and celery-beat to periodically poll POSTMAN API to get cases info, process and store it into our postgresql database using tortoise-orm.

We use Fastapi and TWILIO's Python sdk to serve the queries we get from the WHATSAPP BOT

We use ngrok to provide an external api for tunneling web traffic to our Fastapi service

We can query for info by issuing commands to our WHATSAPP BOT built using TWILIO API.

CASES COUNTRY_CODE

CASES TOTAL

DEATHS COUNTRY_CODE

DEATHS TOTAL

Eg: CASES IN

CASES TOTAL

Sample image

WA bot query sample

Steps to start the app

Navigate to the root of this repo after cloning onto your machine

Run docker volume create covid19dbvolume

Run docker-compose up -d starts the app

Copy the tunnel url provided by ngrok and add /api/v1/ to it

Add /api/v1/ to it to make

Add the above url[https://TESTNGROK.ngrok.io/api/v1/] to https://www.twilio.com/console/sms/whatsapp/sandbox in WHEN A MESSAGE COMES IN section

Query your WA BOT and get the response messages

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT