Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install rapidsms-tropo

How to install rapidsms-tropo

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install rapidsms-tropo
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
0.1.1
0.2.0Never BuiltWhy not?
0.1.1 Available View build log
0.1.0 Available View build log
Linux (64-bit)
0.2.0 Available View build log
0.1.1 Available View build log
0.1.0 Available View build log
 
License
LICENSE.txt
Lastest release
version 0.2.0 on Jan 9th, 2014

Basic Tropo backend for RapidSMS, version 0.14.0 or later.

Requirements

  • System Message: WARNING/2 (<string>, line 2); backlink

    Duplicate explicit target name: "rapidsms".

    RapidSMS, version 0.14.0 or later

    (pip install 'rapidsms>=0.14.0')

  • Django, version 1.4 or later.

Usage

Create an application at tropo.com. Its type should be "Web API".

Add rtropo to your Python path and set up the Tropo backend in your Django settings file.

The required settings for your Tropo backend in INSTALLED_BACKENDS are:

ENGINE
"rtropo.outgoing.TropoBackend"
config

A dictionary with the rest of your settings for this backend. Required settings inside config are:

messaging_token
Your messaging token from Tropo (a long hex string)
number
The phone number your Tropo app is using. Must start with "+" and the country code.

For example:

INSTALLED_BACKENDS = {
    "my-tropo-backend": {
        "ENGINE": "rtropo.outgoing.TropoBackend",
        'config': {
            # Your Tropo application's outbound token for messaging (required)
            'messaging_token': 'YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY',
            # Your Tropo application's voice/messaging phone number, starting
            # with "+" and the country code (required)
            'number': '+1-###-###-####',
        },
    },
}

At this point you should be able to send outgoing messages, but more setup is needed to receiving incoming messages.

Set up your URLconf to send incoming http requests from tropo to rtropo.views.message_received, passing the backend_name parameter, whose value must be the same as the backend name you used in INSTALLED_BACKENDS.

For example:

from django.conf.urls.defaults import *
from rtropo import views

urlpatterns = patterns('',
    url(r"^tropo/$",
        views.message_received,
        kwargs={'backend_name': 'my-tropo-backend'},
        name='tropo'),
)

You can use any URL. If you want to add some (slight) protection against someone other than Tropo passing you messages pretending to be Tropo, you might make your URL long and random, e.g.:

from django.conf.urls.defaults import *
from rtropo import views

urlpatterns = patterns('',
    url(r"^534bd769-3e2e-42bd-8337-2099d9f38858/$",
        views.message_received,
        kwargs={'backend_name': 'my-tropo-backend'},
        name='tropo'),
)

Configure your Tropo application at tropo.com so its SMS/Messaging URL will invoke the Django URL that you just configured. E.g.:

https://yourserver.example.com/534bd769-3e2e-42bd-8337-2099d9f38858/

Changelog

v0.2.0 (Released 2013-05-20)
  • Updates for RapidSMS 0.14 and later.
  • Support for bulk messaging - with RapidSMS 0.14.0 or later, many messages can be sent without requiring separate round trip requests to Tropo for each.
  • Add tests
  • Add tox test runner
  • Drop Tropo python library, which was hardly being used anyway.
  • Security improvements.
v0.1.2 (Released 2013-05-17)
  • Add validation of some incoming requests from Tropo.
  • Probably last version to support threadless-router, rapidsms<0.10.0
v0.1.1 (Released 2012-07-02)
  • Updated MANIFEST to include distribute_setup.py
v0.1.0 (Released 2012-06-28)
  • Initial stable release

Subscribe to package updates

Last updated Jan 9th, 2014

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.