{"id":13469291,"url":"https://github.com/stefanfoulis/django-sendsms","last_synced_at":"2025-04-12T16:38:20.108Z","repository":{"id":41530742,"uuid":"2183759","full_name":"stefanfoulis/django-sendsms","owner":"stefanfoulis","description":"A simple API to send SMS messages. It is modeled after the django email api.","archived":false,"fork":false,"pushed_at":"2024-01-28T06:18:00.000Z","size":96,"stargazers_count":260,"open_issues_count":11,"forks_count":100,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-04-03T17:14:10.598Z","etag":null,"topics":["django","python","sms"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefanfoulis.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null}},"created_at":"2011-08-10T06:40:48.000Z","updated_at":"2025-03-31T14:27:40.000Z","dependencies_parsed_at":"2024-03-27T19:03:21.815Z","dependency_job_id":null,"html_url":"https://github.com/stefanfoulis/django-sendsms","commit_stats":{"total_commits":93,"total_committers":21,"mean_commits":4.428571428571429,"dds":0.7419354838709677,"last_synced_commit":"d4cc29208a7bf9c1458c7758c408f47e9512be92"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanfoulis%2Fdjango-sendsms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanfoulis%2Fdjango-sendsms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanfoulis%2Fdjango-sendsms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanfoulis%2Fdjango-sendsms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanfoulis","download_url":"https://codeload.github.com/stefanfoulis/django-sendsms/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248597744,"owners_count":21130936,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","python","sms"],"created_at":"2024-07-31T15:01:32.126Z","updated_at":"2025-04-12T16:38:20.078Z","avatar_url":"https://github.com/stefanfoulis.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"==============\ndjango-sendsms\n==============\n\n.. image:: https://coveralls.io/repos/github/stefanfoulis/django-sendsms/badge.svg?branch=master\n    :target: https://coveralls.io/github/stefanfoulis/django-sendsms?branch=master\n\n.. image:: https://github.com/stefanfoulis/django-sendsms/workflows/Django%20Send%20SMS%20Build/badge.svg?branch=master\n    :target: https://github.com/stefanfoulis/django-sendsms/actions?query=workflow%3A%22Django%20Send%20SMS%20Build%22\n\n.. image:: https://badge.fury.io/py/django-sendsms.svg\n    :target: https://badge.fury.io/py/django-sendsms\n\nA simple api to send SMS messages with django. The api is structured the same way as Django's own email api.\n\nInstallation\n============\n\n::\n\n    pip install django-sendsms\n\nConfigure the ``SENDSMS_BACKEND`` (defaults to ``'sendsms.backends.console.SmsBackend'``)::\n\n    SENDSMS_BACKEND = 'myapp.mysmsbackend.SmsBackend'\n\n\nBasic usage\n===========\n\nSending SMSs is like sending emails::\n\n    from sendsms import api\n    api.send_sms(body='I can haz txt', from_phone='+41791111111', to=['+41791234567'])\n\nYou can also make instances of ``SmsMessage``::\n\n    from sendsms.message import SmsMessage\n    message = SmsMessage(body='lolcats make me hungry', from_phone='+41791111111', to=['+41791234567'])\n    message.send()\n\n\nCustom backends\n===============\n\nCreating custom ``SmsBackend`` s::\n\n    from sendsms.backends.base import BaseSmsBackend\n    import some.sms.delivery.api\n\n    class AwesomeSmsBackend(BaseSmsBackend):\n        def send_messages(self, messages):\n            for message in messages:\n                for to in message.to:\n                    try:\n                        some.sms.delivery.api.send(\n                            message=message.body,\n                            from_phone=message.from_phone,\n                            to_phone=to,\n                            flashing=message.flash\n                        )\n                    except:\n                        if not self.fail_silently:\n                            raise\n\nThen all you need to do is reference your backend in the ``SENDSMS_BACKEND`` setting.\n\n\nRunning tests\n=============\n\n::\n\n    python setup.py test\n\nOr better, install and run \"tox\".\n\n\nContributing\n============\n\n\nPull requests are very welcome. Please make sure code is formatted using black and isort.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanfoulis%2Fdjango-sendsms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanfoulis%2Fdjango-sendsms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanfoulis%2Fdjango-sendsms/lists"}