photo by Josh Thompson cc-by-2.0
Courtesy of NASA
Courtesy Neal Jennings cc-by-2.0
Internet | SMS | |
---|---|---|
Libya | 16% | 165% |
Africa | 21% | 80% |
South Africa | 49% | 147% |
United States | 87% | 96% |
World | 39% | 97% |
Sources: Wikipedia and World Bank
111222333444 # 12345
You are registeredor with an error message
111222333444
11007 # 3 # 932
© 2010, courtesy RapidSMS on Flickr
pip install rapidsms
INSTALLED_BACKENDS = {
"libyana": {
"ENGINE": "rapidsms.backends.vumi.VumiBackend",
"sendsms_url": 'http://127.0.0.1/libyana',
},
}
urlpatterns += patterns('',
url(r"^backend/vumi-libyana/$",
VumiBackendView.as_view(backend_name="libyana")))
from rapidsms.apps.base import AppBase
class PingPong(AppBase):
def handle(self, msg):
if msg.text == 'ping':
msg.respond('pong')
return True
return False
from rapidsms.apps.base import AppBase
class PingPong(AppBase):
def filter(self, msg):
pass
def parse(self, msg):
pass
def handle(self, msg):
pass
def default(self, msg):
pass
def cleanup(self, msg):
pass
import re
from rapidsms.apps.base import AppBase
class PreprocessApp(AppBase):
def parse(self, msg):
NONDIGITS_RE = re.compile('[^\d]', flags=re.UNICODE)
msg.number_list = [n for n in NONDIGITS_RE.split(msg_text) if n]
RAPIDSMS_ROUTER = "rapidsms.router.celery.CeleryRouter"