예제 #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)
예제 #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)
                           })
예제 #3
0
파일: server.py 프로젝트: crishoj/Surveilr
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)
예제 #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))
예제 #5
0
 def test_user_config_overrides_defaults(self):
     self.assertEquals(config.get_str('test_override', 'foo'), 'baz')
예제 #6
0
 def __init__(self):
     driver_name = config.get_str('sms', 'driver')
     self.driver = drivers.get_driver('sms', driver_name)
예제 #7
0
파일: app.py 프로젝트: Linux2Go/Surveilr
    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)