=====
Dajngo SMS Aero
=====
Simple Django application for send SMS via smsaero.ru
=====
Quick start
=====
1. Add "smsaero" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = (
...
'smsaero',
'django_rq', # if you want use the queue of Redis
)
# if you want use the queue of Redis
RQ_QUEUES = {
'default': {
'HOST': 'localhost',
'PORT': 6379,
'DB': 0,
'PASSWORD': '',
},
}
2. Define SMSAERO_USER and SMSAERO_PASSWORD (raw password) or SMSAERO_PASSWORD_MD5 (hash of password) at settings.py::
SMSAERO_USER = 'username'
SMSAERO_PASSWORD = '123'
# or
SMSAERO_PASSWORD_MD5 = '202cb962ac59075b964b07152d234b70'
3. Run ```python manage.py syncdb``` to create the smsaero models.
4. Start the development server and visit http://127.0.0.1:8000/admin/
to create a smsaero (you'll need the Admin app enabled).
=====
Usage
=====
Send SMS, check the SMS status, get account balance and get signatures::
from smsaero.urils import send_sms
from smsaero.urils import get_sms_status
from smsaero.urils import get_balance
from smsaero.urils import get_signatures_name
from smsaero.models import SMSMessage
# Send SMS
sms = send_sms('+79998881122', 'Some text...') # sms has SMSMessage type
print sms.sms_id # id of accepted message
print sms.get_status_display() # status
# Check SMS status
status = get_sms_status(sms.sms_id) # returned string
# Get balance of accaunt
print get_balance() # returned the rubbles
# Get array of signature names
print get_signatures_name() # Array of string
Running workers::
python manage.py rqworker default
Async send SMS::
from smsaero.urils import send_sms_async
from smsaero.urils import get_sms_status_async
from smsaero.urils import get_balance_async
from smsaero.urils import get_signatures_name_async
from smsaero.models import SMSMessage
# Send SMS
job = send_sms_async('+79998881122', 'Some text...')
job.result # result has SMSMessage type
job = get_sms_status_async(sms.sms_id)
job.result # return string
job = get_balance_asunc()
job.result # returned the rubbles
job = get_signatures_name()
job.result # Array of string
Dajngo SMS Aero
=====
Simple Django application for send SMS via smsaero.ru
=====
Quick start
=====
1. Add "smsaero" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = (
...
'smsaero',
'django_rq', # if you want use the queue of Redis
)
# if you want use the queue of Redis
RQ_QUEUES = {
'default': {
'HOST': 'localhost',
'PORT': 6379,
'DB': 0,
'PASSWORD': '',
},
}
2. Define SMSAERO_USER and SMSAERO_PASSWORD (raw password) or SMSAERO_PASSWORD_MD5 (hash of password) at settings.py::
SMSAERO_USER = 'username'
SMSAERO_PASSWORD = '123'
# or
SMSAERO_PASSWORD_MD5 = '202cb962ac59075b964b07152d234b70'
3. Run ```python manage.py syncdb``` to create the smsaero models.
4. Start the development server and visit http://127.0.0.1:8000/admin/
to create a smsaero (you'll need the Admin app enabled).
=====
Usage
=====
Send SMS, check the SMS status, get account balance and get signatures::
from smsaero.urils import send_sms
from smsaero.urils import get_sms_status
from smsaero.urils import get_balance
from smsaero.urils import get_signatures_name
from smsaero.models import SMSMessage
# Send SMS
sms = send_sms('+79998881122', 'Some text...') # sms has SMSMessage type
print sms.sms_id # id of accepted message
print sms.get_status_display() # status
# Check SMS status
status = get_sms_status(sms.sms_id) # returned string
# Get balance of accaunt
print get_balance() # returned the rubbles
# Get array of signature names
print get_signatures_name() # Array of string
Running workers::
python manage.py rqworker default
Async send SMS::
from smsaero.urils import send_sms_async
from smsaero.urils import get_sms_status_async
from smsaero.urils import get_balance_async
from smsaero.urils import get_signatures_name_async
from smsaero.models import SMSMessage
# Send SMS
job = send_sms_async('+79998881122', 'Some text...')
job.result # result has SMSMessage type
job = get_sms_status_async(sms.sms_id)
job.result # return string
job = get_balance_asunc()
job.result # returned the rubbles
job = get_signatures_name()
job.result # Array of string
Release files for django-smsaero 0.9.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django-smsaero-0.9.5.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django-smsaero-0.9.5.macosx-10.8-intel.exe | Details |
Total release size: 79.1 kB
Release files / django-smsaero-0.9.5.tar.gz
| Download URL | django-smsaero-0.9.5.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c789227dc048c9711f3ee60bc9e415796cdb8371f663db15adaf1876ac235207
|
|
BLAKE2b-256 checksum How to use checksums |
e934a5bf501ee5ce782c09abb745c683c631a5361bc7069ae16c6008d16b25e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / django-smsaero-0.9.5.macosx-10.8-intel.exe
| Download URL | django-smsaero-0.9.5.macosx-10.8-intel.exe |
|---|---|
| Size | 72.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1609344b53137ee570bb4fb5f6982233adbba0f04394d0bcbaec479eb6fa0eb
|
|
BLAKE2b-256 checksum How to use checksums |
7b2eaaad5b802a9d130db7491217eb3261c9bf3db1c781c0d7c6d3370ea997a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |