You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 3.6+ because F strings are the best strings.
How it works
When the hotline is called, it will ring the phones listed in the COC_NUMBERS env variable.
The caller will be connected to the first person who responds.
At PyCascades, it will also post to a private slack channel so we have
a record of who called, who answered, how long was the call, and when.
Why a hotline?
It is easier to share one consistent phone number to call, as opposed to listing
various phone numbers. We can repurpose the same number year after year,
and have the flexibility to add/remove people who will answer the call.
Installation
Create and activate a virtual environment.
Run pip install -r requirements.txt to install the dependencies
(Optional) Add the "Incoming Webhooks" integration to your slack team of choice
Follow the configuration instructions and write down your WebHook URL
Set the following environment variables:
COC_NUMBERS: A comma separated list of phone numbers prefixed with +, numbers should include country code.
COC_HTTP_SCHEME: either http or https, we recommend deploying with AWS Lambda which will provide https for you.
COC_SLACK_URL: (Optional) The WebHook URL provided by the Incoming Webhooks Slack integration.
Run python coc-hotline.py
Deployment
This tool was built to be run on AWS Lambda,
but could easily be adapted to run anywhere you can run
Python 3.6+. To deploy to AWS Lambda follow the below instructions:
Create an AWS account and configure your AWS credentials file.
Create and activate a virtual environment.
Run pip install -r requirements.txt
Run zappa init
Answer all of the questions asked.
Add an environment_variables attribute to your zappa config and fill out the environment
variables listed in the installation instructions above.