/smspy

A minimalistic python wrapper for way2sms, Send up-to 100 free SMS in India daily. :tada: :sparkles:

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

SMSpy

A minimalistic python wrapper for sending free sms via website way2sms.

FOSSA Status https://travis-ci.org/guptarohit/smspy.svg?branch=master

Installation

$ pip install -U git+git://github.com/guptarohit/smspy.git

Usage

Send SMS

from smspy import Way2sms

w2s = Way2sms()

w2s.login(USERNAME, PASSWORD)

w2s.send(MOBILE_NUMBER, MESSAGE)

w2s.logout()

Schedule SMS

from smspy import Way2sms

w2s = Way2sms()

w2s.login(USERNAME, PASSWORD)

w2s.schedule(MOBILE_NUMBER, MESSAGE, DATE, TIME)
# DATE should be in format DD/MM/YYYY and TIME in 24h HH:mm

w2s.logout()

Check History of sent messages

from smspy import Way2sms

w2s = Way2sms()

w2s.login(USERNAME, PASSWORD)

headers, data = w2s.history(DATE)
# DATE should be in format DD/MM/YYYY

print(headers, data)

w2s.logout()

Check Scheduled messages

from smspy import Way2sms

w2s = Way2sms()

w2s.login(USERNAME, PASSWORD)

headers, data = w2s.scheduled_messages(DATE)
# DATE should be in format DD/MM/YYYY

print(headers, data)

w2s.logout()

Check Quota left

from smspy import Way2sms

w2s = Way2sms()

w2s.login(USERNAME, PASSWORD)

msgs_remaining=w2s.quota_left()

print(msgs_remaining)

w2s.logout()

Contributing

Feel free to make a pull request! :octocat:

License

FOSSA Status