Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fif0o/twilio-app
📡 Boilerplate python code (flask web server) using Twilio messaging api to send/receive text messages.
https://github.com/fif0o/twilio-app
flask python twilio twilio-api twilio-sms-api
Last synced: 3 days ago
JSON representation
📡 Boilerplate python code (flask web server) using Twilio messaging api to send/receive text messages.
- Host: GitHub
- URL: https://github.com/fif0o/twilio-app
- Owner: FiF0o
- License: mit
- Created: 2017-10-13T13:29:15.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-06-01T21:47:23.000Z (over 3 years ago)
- Last Synced: 2024-04-14T04:44:09.278Z (9 months ago)
- Topics: flask, python, twilio, twilio-api, twilio-sms-api
- Language: Python
- Homepage:
- Size: 19.2 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PYTHON APP USING API MESSAGING FROM TWILIO AND ARDUINO WATER SENSOR
A (Js) serverless implementation of the back-end is also available.
## Pre-requisites
-----------------### Deps
install deps: `pip install -r requirements.txt`.### Twilio configuration
Add your own `account_sid`, `auth_token`, `from` (given by twilio when creating a phone number for your servie), `to` numbers to your environment after your registered for a Twilio account.
It can be found in your [console](https://www.twilio.com/console).
your `to` phone number (used to create a twilio account) must be [verified](https://www.twilio.com/console/phone-numbers/incoming).### Environment
Create your own virtual environment: `virtualenv .venv`.
Activate your environment: `source .venv/bin/activate`.
Add your environment variables to a `.env` file.
Source environment variables for your project before running it: `source .env` or use `autoenv`.## Running the project
----------------------### Twilio Messaging configuration
Run webserver with [Twilio SMS Webhook](https://www.twilio.com/console/phone-numbers/).
If you don't want to host your webserver you can use ngrok locally to add your webhook endpoint to the Messaging service `/sms` route on the webserver `PORT:5000`.### Available commands
Use the `Makefile` to `serve` and run your project.
### Javascript and serverless endpoint
`./serverless` directory holds a script using [webtask.io](https://webtask.io/) using Twilio API.
Alternatively, you can use [stdlib](https://stdlib.com/).After `cd` the directory, you can install the deps `npm i`, and run the npm `deploy` task to update your script on webtask.io.
You will need to provide a `.secrets` file with your API variables: `TWILIO_ACCOUNT_SID`, `TWILIO_AUTH_TOKEN`, `TWILIO_NUMBER_FROM`, `TWILIO_NUMBER_TO` or source them in your environment.## Examples of implementation
-----------------------------* [Leak detector](https://github.com/slyg/leak-detector) - [@slyg](https://github.com/slyg) & [@fif0o](https://github.com/fif0o)
![leak detector](https://giphy.com/embed/l4EoO8Tmm5ShB7GdW)