Esempio n. 1
0
    def __init__(self):
        username = config.get_str('sms', 'username')
        password = config.get_str('sms', 'password')
        kwargs = {}
        try:
            kwargs['server'] = config.get_str('sms', 'server')
        except config.NoOptionError:
            pass

        self.client = BulkSMS.Server(username, password, **kwargs)
Esempio n. 2
0
 def __init__(self):
     username = config.get_str('sms', 'username')
     password = config.get_str('sms', 'password')
     api_id = config.get_str('sms', 'api_id')
     self.client = Clickatell(username, password, api_id,
                              sendmsg_defaults={
                                 'callback': cc.YES,
                                 'msg_type': cc.SMS_DEFAULT,
                                 'deliv_ack': cc.YES,
                                 'req_feat': (cc.FEAT_ALPHA +
                                              cc.FEAT_NUMER +
                                              cc.FEAT_DELIVACK)
                           })
Esempio n. 3
0
def main():
    riak_host = config.get_str('riak', 'host')
    riak_port = config.get_int('riak', 'port')

    riakalchemy.connect(host=riak_host, port=riak_port)
    socket = eventlet.listen(('', 9877))
    eventlet.wsgi.server(socket, application)
Esempio n. 4
0
 def send(self, recipient, info):
     sender = config.get_str('sms', 'sender')
     self.client.sendmsg(recipients=[recipient.messaging_address],
                         sender=sender,
                         text=str(info))
Esempio n. 5
0
 def test_user_config_overrides_defaults(self):
     self.assertEquals(config.get_str('test_override', 'foo'), 'baz')
Esempio n. 6
0
 def __init__(self):
     driver_name = config.get_str('sms', 'driver')
     self.driver = drivers.get_driver('sms', driver_name)
Esempio n. 7
0
    def __init__(self, global_config):
        riak_host = config.get_str('riak', 'host')
        riak_port = config.get_int('riak', 'port')

        riakalchemy.connect(host=riak_host, port=riak_port)