This project is to create a whatsapp bot that can give latest information about COVID-19 situation in Sri Lanka
This app was created by following the base tutorial: https://www.twilio.com/blog/build-a-whatsapp-chatbot-with-python-flask-and-twilio
- Python 3.6 or newer
- Virtual environment python plugin (Installation steps are given below).
- Flask web application framework for Python
- A smartphone with an active phone number and WhatsApp installed.
- A Twilio account
- Create a Fork of this repository and clone it to your developer machine.
- Install Python 3.6 or newer.
- Install Python package VirtualEnv. using
pip3 install virtualenv
. - Activate virtual environment and install dependencies. Windows (Powershell) ->
virtualenv .env; .\.env\Scripts\activate; pip install -r requirements.txt
, Mac/Unix ->virtualenv .env && source .env/bin/activate && pip install -r requirements.txt
- Run Flask Application. Windows (Powershell) ->
$env:FLASK_APP = "application.py"; flask run
, Mac/Unix ->export FLASK_APP=application.py && flask run
- Use the steps 'Testing the Chat bot' in the article to setup ngrok tunnel and related Twilio configurations.
Note: Follow the cofiguration steps given in the article for more information regarding how it works. If you need to install new python packages make sure you export them to requirements.txt by using pip freeze > requirements.txt
You can install Postman and send a POST request to http://127.0.0.1:5000/bot with form-data and Key is "Body" and having number 1, 2 & etc. as the value.
We are using AWS ElasticBeanstalk for the deployment and you can find more details in Deploying a flask application to Elastic Beanstalk