django-smsish
Forked from RyanBalfanz
Installation
Add smsish to your INSTALLED_APPS and set SMS_BACKEND.
INSTALLED_APPS += (
'smsish',
)
SMS_BACKEND_CONSOLE = 'smsish.sms.backends.console.SMSBackend'
SMS_BACKEND_DUMMY = 'smsish.sms.backends.dummy.SMSBackend'
SMS_BACKEND_TWILIO = 'smsish.sms.backends.twilio.SMSBackend'
SMS_BACKEND_YUNPIAN = 'smsish.sms.backends.yunpian.SMSBackend'
SMS_BACKEND = SMS_BACKEND_DUMMY
Twillio
To use the Twilio backend set some additional settings as well.
TWILIO_ACCOUNT_SID = os.getenv("TWILIO_ACCOUNT_SID", None)
TWILIO_AUTH_TOKEN = os.getenv("TWILIO_AUTH_TOKEN", None)
TWILIO_MAGIC_FROM_NUMBER = "+15005550006" # This number passes all validation.
TWILIO_FROM_NUMBER = os.getenv("TWILIO_FROM_NUMBER", TWILIO_MAGIC_FROM_NUMBER)
Example:
from smsish.sms import send_sms
send_msg(message, '', (phone,))
Note: You must also pip install twilio to use the Twilio backend.
Yunpian
settings.py:
YUNPIAN_API_KEY = getenv("YUNPIAN_API_KEY")
Note: You must also pip install yunpian-python-sdk to use the YunPian backend.
Example:
from smsish.sms import send_sms
send_msg(message, '', (phone,))
Test
tox
# tox in docker
docker run --rm -it -v ${PWD}:/src themattrix/tox
Metadata
Release files for django-smsish2 1.3.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 | Provenance | Actions |
|---|---|---|---|---|
| django-smsish2-1.3.5.tar.gz | 10.3 kB | Without provenance | Details for django-smsish2-1.3.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| django_smsish2-1.3.5-py3-none-any.whl | Python 3 | none | any | Details for django_smsish2-1.3.5-py3-none-any.whl |
Total release size: 27.5 kB
Release files / django-smsish2-1.3.5.tar.gz
| Download URL | django-smsish2-1.3.5.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69c6da3199e3b56c739fb96fbd3030965a1a329a65d05be448f28cd3203ed93e
|
|
BLAKE2b-256 checksum How to use checksums |
b08f396e8660696d62d8b957ba52ea63eb0591422b8480e29a53fc2112f57725
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.5
|
Release files / django_smsish2-1.3.5-py3-none-any.whl
| Download URL | django_smsish2-1.3.5-py3-none-any.whl |
|---|---|
| Size | 17.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
074d58f216b4f7054873efca980a2ec475a793bfa919ab2daf9bf52eadd30020
|
|
BLAKE2b-256 checksum How to use checksums |
c7cd2ff4c91895a05b169a8698035210f9a66b4090bb907f2402651748d2d62c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.5
|
Security for django-smsish2 1.3.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.