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)
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) })
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)
def send(self, recipient, info): sender = config.get_str('sms', 'sender') self.client.sendmsg(recipients=[recipient.messaging_address], sender=sender, text=str(info))
def test_user_config_overrides_defaults(self): self.assertEquals(config.get_str('test_override', 'foo'), 'baz')
def __init__(self): driver_name = config.get_str('sms', 'driver') self.driver = drivers.get_driver('sms', driver_name)
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)