Super-fast Twilio SMS response API
Project description
Fast Twilio SMS message response API
pyrowire is an API that handles all of the plumbing necessary to create an SMS message response project with Twilio. After installing pyrowire, all you have to do is decide what you want to do with the data that comes in to your web server. We’ve got the rest covered.
Documentation
For full documentation and a tutorial, please visit our documentation page.
License Info
This repository is licensed under the BSD 3-Clause license. You can view the license in the github repo
1-minute Installation & Setup
pyrowire can be installed and initialized via pip, and is best used with virtualenv. From the root directory of your project, run:
pip install pyrowire && pyrowire-init
my_app.py (the application file)
my_settings.py (the configuration file)
Procfile (a Heroku Procfile)
requirements.txt (pip requirements file)
Usage
ENV=(DEV|STAGING|PROD) [RUN=(web|worker)] python my_app.py
Sample Application
Here’s what the sample app (from running pyrowire-init) looks like:
import pyrowire
import my_settings
# configure the pyrowire application
pyrowire.configure(settings=my_settings)
# all app.handler methods need to be annotated with the topic for which they process
# and take one kwarg, 'message_data'
@pyrowire.handler(topic='my_topic')
def my_handler(message_data=None):
pass
# all app.validator methods need to be annotated with the name of the validator
# and take one kwarg, 'message_data'
@pyrowire.validator(name='my_validator')
def my_validator(message_data=None):
pass
if __name__ == '__main__':
pyrowire.run()
As you can see, it’s rather straightforward; to start out you are given placeholders for both a handler and a validator. The handler is where you will write the business logic for your Twilio application. One or more validators can be added if needed, or removed altogether. See their respective sections below for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyrowire-0.8.0.macosx-10.10-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4ab4370b7123bd1be04304168b81db996541781a181c8acebe5793db05d0ef5 |
|
MD5 | c36a14faf1a35820d0807130bd921ec7 |
|
BLAKE2b-256 | c1bcaacc9be063fd6a83d44c2085ad198bf58cdb39348a8fa5b48391a2837889 |