Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Internet > HTTP (WWW)

    django-sendsms 0.2.2

    Download button

    No screenshots available
    Downloads: 186  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Stefan Foulis | More programs
    BSD License / FREE
    April 22nd, 2012, 13:36 GMT
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    django-sendsms description

    A simple API to send SMS messages

    django-sendsms is a simple API to send SMS messages with Django. The api is structured the same way as djangos own email api.

    Installation

    pip install django-sendsms

    Configure the SENDSMS_BACKEND (defaults to 'sendsms.backends.console.SmsBackend'):

    SENDSMS_BACKEND = 'myapp.mysmsbackend.SmsBackend'

    Basic usage

    Sending SMSs is like sending emails:

    from sendsms import api
    api.send_sms(body='I can haz txt', from_phone='+41791111111', to=['+41791234567'])


    you can also make instances of SmsMessage:

    from sendsms.message import SmsMessage
    message = SmsMessage(body='lolcats make me hungry', from_phone='+41791111111', to=['+41791234567'])
    message.send()


    Custom backends

    Creating custom SmsBackend s:

    from sendsms.backends.base import BaseSmsBackend
    from some.sms.delivery.api


    class AwesomeSmsBackend(BaseSmsBackend):
     def send_messages(self, messages):
     for message in messages:
     for to in message.to:
     try:
     some.sms.delivery.api.send(
     message=message.body,
     from_phone=message.from_phone,
     to_phone=to,
     flashing=message.flash
     )
     except:
     if not self.fail_silently:
     raise


    Then all you need to do is reference your backend in the SENDSMS_BACKEND setting.


    Product's homepage

    Requirements:

    · Python
    · Django

      


    TAGS:

    SMS sender | text messages | Django SMS | Django | SMS | messages

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM