smsprovider.SMSProvider module

the SMS Provider Interface

class smsprovider.SMSProvider.ISMSProvider[source]

Bases: object

Interface class for the SMS providers

classmethod getClassInfo(key=None)[source]
static get_bool(config, key, default)[source]
helper method - get the boolean value from a config entry,
which could be either boolean or string

as we might get from the json a real boolean or a string, we use the %r to print the representation to generalize the processing

loadConfig(configDict)[source]
submitMessage(phone, message)[source]
submitMessage - the method of all SMS Providers after preparation
the subclass method of _submitMessage() is called
Parameters:
  • phone – the unformatted, arbitrary phone number
  • message – the message that should be submitted
Returns:

boolean value of success

smsprovider.SMSProvider.getSMSProviderClass(packageName, className)[source]

helper method to load the SMSProvider class from a given package in literal: checks, if the submittMessage method exists else an error is thrown

example:
getResolverClass(“SkypeSMSProvider”, “SMSProvider”)()
Returns:the SMS provider object