SMS framework: Clickatell provider
Project description
SMSframework Clickatell Provider
Clickatell Provider for smsframework.
You need a "Developers' Central" Clickatell account with an HTTP API set up. From the API, you need: api_id, username, password.
Installation
Install from pypi:
$ pip install smsframework_clickatell
To receive SMS messages, you need to ensure that Flask microframework is also installed:
$ pip install smsframework_clickatell[receiver]
Initialization
from smsframework import Gateway
from smsframework_clickatell import ClickatellProvider
gateway = Gateway()
gateway.add_provider('clickatell', ClickatellProvider,
api_id=1,
user='kolypto',
password='123',
https=False
)
Config
Source: /smsframework_clickatell/provider.py
api_id: str
: API ID to useuser: str
: Account usernamepassword: str
: Account passwordhttps: bool
: Use HTTPS for outgoing messages? Default:False
Sending Parameters
Provider-specific sending params:
deliv_time: int
: Delay the delivery for X minutes
Example:
from smsframework import OutgoingMessage
gateway.send(OutgoingMessage('+123', 'hi').params(deliv_time=15))
Additional Information
OutgoingMessage.meta
None.
IncomingMessage.meta
api_id: str
: API idcharset: str
: Message character set (when applicable, else - None)udh: str
: Header Data (when applicable, else - None)
MessageStatus.meta
status: int
: Message status codeapi_id: str
: API idcharge: float
: Charged funds
Public API
ClickatellProvider.get_balance()
Returns the credist left on the account:
provider = gateway.get_provider('clickatell')
provider.get_balance() #-> 10.6
Receivers
Source: /smsframework_clickatell/receiver.py
Message Receiver: /im
After a number is purchased, go to Receive Messages > Manage long numbers / short codes, and then click the ‘Edit’ link of the two-way number which you would like to configure. Set "Reply Path" to "HTTP Get" | "HTTP Post", in the field - put the message receiver URL.
- "Username & Password" is not supported
- "Secondary callback" is up to you
Message Receiver URL: <provider-name>/im
Status Receiver: /status
To start getting status reports from Clickatell, edit the HTTP API in the admin panel and click on "Enable your app to receive message delivery notifications". In the field, put the receiver URL.
- Status receiver only supports "HTTP Get" and "HTTP Post" methods.
- "basic HTTP Authentication" is not supported
Status Receiver URL: <provider-name>/status
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file smsframework-clickatell-0.0.3.post0.tar.gz
.
File metadata
- Download URL: smsframework-clickatell-0.0.3.post0.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5908b53fe28dfd88e1b9b44932820e65bbc78bdb7a1474001d7fc2a5ca6a93e1 |
|
MD5 | 6aecd43d7f81c23da5e79e306c5efe23 |
|
BLAKE2b-256 | c565b220327494228b11715126023782a410078044d6128767083568c252e1d9 |
File details
Details for the file smsframework_clickatell-0.0.3.post0-py2.py3-none-any.whl
.
File metadata
- Download URL: smsframework_clickatell-0.0.3.post0-py2.py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b0ca24b331c2ce792f6858026019de93a7b356ec048641c31a21e8275596a1b |
|
MD5 | 414486f77e8971f201467c056798f748 |
|
BLAKE2b-256 | 34f84f4f024d3b5e04d79d8e1b3b1a05faae0351e36a5bd00bf02962fb9cac82 |