Skip to main content

Super-fast Twilio SMS response API

Project description

pyrowire

You need to create an SMS application? F*@k yeah you do. pyrowire is a framework you can use to quickly create Twilio-based SMS/MMS applications.

License

pyrowire is licensed under the BSD 3-clause license, and can be viewed here.

Quickstart

For the purposes of this quickstart, it is assumed that you have an account with both Heroku and Twilio, and that you have at minimum the following installed:
  • pip

  • virtualenv

In your virtual environment root directory, execute:

$ pip install pyrowire && pyrowire --init
This will install pyrowire, and copy into the root folder the following files:

Usage

$ ENV=(DEV|STAGING|PROD) [RUN=(WEB|WORKER)] [TOPIC=] python my_app.py

Sample Application

Here’s what the my_app.py file (created by running pyrowire-init) looks like:

import pyrowire
import my_settings

pyrowire.configure(settings=my_settings)

# all app.processor 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_processor(message_data=None):
    pass

# all pyro.filter methods need to be annotated with the name of the filter
# and take one kwarg, 'message_data'
@pyrowire.validator(name='my_validator')
def my_filter(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, and additional validators can be added if needed, or removed altogether. See their respective sections for more information.

For full documentation and a tutorial, please visit our documentation page.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyrowire-0.8.1.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

pyrowire-0.8.1.macosx-10.10-x86_64.tar.gz (33.3 kB view details)

Uploaded Source

File details

Details for the file pyrowire-0.8.1.tar.gz.

File metadata

  • Download URL: pyrowire-0.8.1.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyrowire-0.8.1.tar.gz
Algorithm Hash digest
SHA256 f01b3f2e1a1beac1fb5e849677ee77482da4e4e6328dee5bd830149a07e7c2ed
MD5 de208d2bbdc350960337d9259d5d714a
BLAKE2b-256 d999898ecf94a20fcdd4f31376e03516096ca0903ec3211aac2f1e87c87721db

See more details on using hashes here.

File details

Details for the file pyrowire-0.8.1.macosx-10.10-x86_64.tar.gz.

File metadata

File hashes

Hashes for pyrowire-0.8.1.macosx-10.10-x86_64.tar.gz
Algorithm Hash digest
SHA256 6d58670bad15c9f8c046c78a00fe96f1fc899b1b1c6c437817b9a6eecf4d7279
MD5 eef34975d1e3c427c068d280cd56726a
BLAKE2b-256 21fe3f8e9a05fdb7872269a14fefa1d5a97b329b350f9a418468f1506aa1ac23

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page