Gabia SMS module for Django
Python 2 & 3 compatible
Source code: https://github.com/hwshim0810/gabia-sms-Django
Distribution: https://pypi.python.org/pypi/gabia-sms-Django
Quickstart
Send sms message to use shortcut function
import gabia_sms
try:
# Send single SMS
gabia_sms.send(message='message', receiver='will receive phone number')
except SMSModuleException:
print('SMS send failure')
SMS Types: [‘sms’, ‘lms’, ‘multi_sms’, ‘multi_lms’]
Send function returning Tuple(Unique key, Result code)
More usage
import gabia_sms
try:
# Reserve single SMS
gabia_sms.send(
message='message',
receiver='will receive phone number',
scheduled_time='2018-02-02 22:22:22'
)
# Send multiple SMS
gabia_sms.send(message='message', receiver=['phone number', '...'])
gabia_sms.send(message='message', receiver=('phone number', '...'))
# Reserve multiple SMS
gabia_sms.send(
message='message',
receiver=['phone number', '...'],
scheduled_time='2018-02-02 22:22:22'
)
# Cancel reservation
gabia_sms.cancel_reservation('Unique key', 'SMS type')
# Request result code
gabia_sms.get_send_result('Unique key')
except SMSModuleException:
print('SMS send failure')
Advanced usage
Inherit SMS class, override post_sent_sms / before_send_sms
import gabia_sms
class AdvancedSMSModule(GabiaSMS):
def post_sms_sent(self, param, *args, **kwargs):
# ... Do what you need
def before_send_sms(self, param, *args, **kwargs):
# ... Do what you need
AdvancedSMSModule.send(message='message', receiver='will receive phone number')
Dependencies
Python 2.7 or 3.4+
Django 1.11+
Installation
You can install the library directly from pypi using pip:
$ pip install gabia-sms-Django
Edit your settings.py file:
GABIA_SMS_SETTINGS = {
'SENDER': 'YOUR NUMBER',
'API_ID': 'YOUR API ID,
'API_KEY': 'YOUR API KEY'
}
Contributors
See https://github.com/hwshim0810/gabia-sms-Django/graphs/contributors
Metadata
Release files for gabia-sms-Django 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gabia_sms_Django-1.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / gabia_sms_Django-1.1.1-py3-none-any.whl
| Download URL | gabia_sms_Django-1.1.1-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90ca3033bb959057d195f7decc60562e6457bbce57d54b7474f22b2cf8c4eb29
|
|
BLAKE2b-256 checksum How to use checksums |
c9507c39d8dadaf43b3ed54dac7c5dbcd2fb527d6509cf7d6a6e45150da39038
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |