Skip to content

Instantly share code, notes, and snippets.

@sripathikrishnan
Created April 4, 2014 02:50
Show Gist options
  • Select an option

  • Save sripathikrishnan/9967172 to your computer and use it in GitHub Desktop.

Select an option

Save sripathikrishnan/9967172 to your computer and use it in GitHub Desktop.
Airtel Stateless SMS Client
class AirtelStatelessSMSGateway:
def __init__(self, url, username, password):
self.url = url
self.username = username
self.password = password
def send_sms(self, phone_number, message):
payload = {'mob_no': phone_number, 'text': message,
'login': self.username, 'pass': self.password}
resp = requests.post(url=url, params=params)
#skipping error handling for brevity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment