skip to navigation
skip to content

Not Logged In

django-skebby 0.2.1

A Django app to send sms with skebby

Latest Version: 0.3.0

django-skebby
===================

A simple Django app to send sms with Skebby.

Usage
-----

In settings.py:

    SKEBBY_USERNAME = 'yourskebbyusername'
    SKEBBY_PASSWORD = 'yourskebbypassword'

In your code:

    from django_skebby.utils import Sms, credit_left

    # greetings to some people
    sms = Sms("Good {{ festivity }}{% if friend %} {{ friend }}{% endif %}!", ["39123456789", "3912346788"], sender_string="Your friend", ctx={'festivity': 'birthday'})
    ret = sms.send()
    # api request are splitted by Skebby recipients limits, 50000 default, 100000 if requested
    failed_requests = [r for r in ret['body'] if r['error']]
    if failed_requests:
        print "some errors!"

    # to a special friend
    r = sms.send_single({'festivity': birthday, 'friend': 'Doge' }, "3912345679")
    if r['error']:
        print "failed to greet :( %s" % (r['error_message'])

    # check credit
    credit = credit_left()
    if credit['error']:
        print "failed to get credit"
    else:
        print credit['body']
 
File Type Py Version Uploaded on Size
django-skebby-0.2.1.tar.gz (md5) Source 2014-01-15 4KB
  • Downloads (All Versions):
  • 7 downloads in the last day
  • 72 downloads in the last week
  • 379 downloads in the last month