All Projects → stefanfoulis → Django Sendsms

stefanfoulis / Django Sendsms

Licence: mit
A simple API to send SMS messages. It is modeled after the django email api.

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Django Sendsms

Freeipa Password Reset
Self-service password reset app for FreeIPA
Stars: ✭ 44 (-78.85%)
Mutual labels:  django, sms
Django Notifs
Modular Notifications (InApp, Email, SMS, CustomBackend etc) for Django
Stars: ✭ 105 (-49.52%)
Mutual labels:  django, sms
Django Herald
A Django messaging library
Stars: ✭ 159 (-23.56%)
Mutual labels:  django, sms
Wepush
专注批量推送的小而美的工具,目前支持:模板消息-公众号、模板消息-小程序、微信客服消息、微信企业号/企业微信消息、阿里云短信、阿里大于模板短信 、腾讯云短信、云片网短信、E-Mail、HTTP请求、钉钉、华为云短信、百度云短信、又拍云短信、七牛云短信
Stars: ✭ 2,597 (+1148.56%)
Mutual labels:  sms
Djangochannelsgraphqlws
Django Channels based WebSocket GraphQL server with Graphene-like subscriptions
Stars: ✭ 203 (-2.4%)
Mutual labels:  django
Ssm Env
Expand env variables from AWS Parameter Store
Stars: ✭ 205 (-1.44%)
Mutual labels:  sms
Csdnbot
CSDN 资源下载器
Stars: ✭ 209 (+0.48%)
Mutual labels:  django
Django Behaviors
Easily integrate common behaviors for Django models, e.g. Timestamps, Publishing, Authoring, Editing and more.
Stars: ✭ 201 (-3.37%)
Mutual labels:  django
Nekosms
A pattern-based text message blocker for Android.
Stars: ✭ 206 (-0.96%)
Mutual labels:  sms
Woid
Simple news aggregator displaying top stories in real time
Stars: ✭ 204 (-1.92%)
Mutual labels:  django
Blogbackendproject
Backend code for my blogs, develop with Django Rest framework.
Stars: ✭ 204 (-1.92%)
Mutual labels:  django
Django Graphql Auth
Django registration and authentication with GraphQL.
Stars: ✭ 200 (-3.85%)
Mutual labels:  django
Django Static Precompiler
Django Static Precompiler provides template tags and filters to compile CoffeeScript, LiveScript, SASS / SCSS, LESS, Stylus, Babel and Handlebars. It works with both inline code and external files.
Stars: ✭ 206 (-0.96%)
Mutual labels:  django
Django Maintenance Mode
shows a 503 error page when maintenance-mode is on. 🚧 🛠
Stars: ✭ 200 (-3.85%)
Mutual labels:  django
Py Elasticsearch Django
基于python语言开发的千万级别搜索引擎
Stars: ✭ 207 (-0.48%)
Mutual labels:  django
Django Material
Material Design for Django
Stars: ✭ 2,362 (+1035.58%)
Mutual labels:  django
Weblate
Web based localization tool with tight version control integration.
Stars: ✭ 2,719 (+1207.21%)
Mutual labels:  django
Tech Blog
我的个人技术博客(Python、Django、Docker、Go、Redis、ElasticSearch、Kafka、Linux)
Stars: ✭ 203 (-2.4%)
Mutual labels:  django
Vonage Ruby Sdk
Vonage REST API client for Ruby. API support for SMS, Voice, Text-to-Speech, Numbers, Verify (2FA) and more.
Stars: ✭ 203 (-2.4%)
Mutual labels:  sms
Reactify Django
Integrate React & Django
Stars: ✭ 205 (-1.44%)
Mutual labels:  django

============== django-sendsms

.. image:: https://coveralls.io/repos/github/stefanfoulis/django-sendsms/badge.svg?branch=master :target: https://coveralls.io/github/stefanfoulis/django-sendsms?branch=master

.. image:: https://travis-ci.org/stefanfoulis/django-sendsms.svg?branch=master :target: https://travis-ci.org/stefanfoulis/django-sendsms

.. image:: https://badge.fury.io/py/django-sendsms.svg :target: https://badge.fury.io/py/django-sendsms

A simple api to send SMS messages with django. The api is structured the same way as Django's 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
import 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.

Running tests

::

python setup.py test

Or better, install and run "tox".

Contributing

Pull requests are very welcome. Please make sure code is formatted using black and isort.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].