Skip to main content

ismslib

Very simple and easy to use Python 3 library for integrating SSLWireless SMS API.

Installation

using virtual environment (pipenv)

pipenv install ismslib

using pip globally

python3 -m pip install ismslib

Example

from ismslib import ISMS

# Contact with SSLWireless Key Account Manager for these credentials
config = {
    "username": '<user>',
    "password": '<pass>',
    "sid": '<SID>',
}

response = ISMS.set_config(config)\
                .set_body("আসসালামু আলাইকুম").make_unicode()\
                .set_recipient(['88018XXXXXXXX', '88019XXXXXXXX'])\
                .send()

print(response) if response['error'] else print('success')

Usage

1. First we import the library

 from ismslib import ISMS

2. Set Credentials

Create a dictionary with user credentials obtained from SSLWireless.

config = {
    "username": '',  # Please add your username provided by SSLWireless
    "password": '',  # Please add your password provided by SSLWireless
    "sid": '',  # Please add your SID provided by SSLWireless
}

3. Set data

Call needed methods with valid data
ISMS.set_config(config) # Set config values
ISMS.set_body("আসসালামু আলাইকুম") #Set SMS body text, Can be English or Unicode Bangla
ISMS.make_unicode() # Use for Bangla SMS, otherwise is not needed
ISMS.set_recipient(['88018XXXXXXXX', '88019XXXXXXXX']) # list of mobile numbers to send to
ISMS.set_debug(True) # __DO NOT USE IN PRODUCTION__. Prints useful information on console.
response = ISMS.send() # Finally send SMS.
optionally, methods can be chained together
response = ISMS.set_config(config)\
                .set_body("আসসালামু আলাইকুম").make_unicode()\
                .set_recipient(['88018XXXXXXXX', '88019XXXXXXXX'])\
                .set_debug()\
                .send()

4. Check the returned response

We can print out the response in console

print(response) if response['error'] else print('success')

Return values

"send()" returns a dictionary containing 3 values
{'error': True, 'msg': 'Login FAILED. Please check your username and password.', 'json': '{"REPLY": {"PARAMETER": "OK", "LOGIN": "FAIL"}}'}
1. error [boolean] : False if SMS sent successfully, True on error
2. msg [string] : Error message. Explains the reason of failure.
3. json [json string] : Raw API response, it's there if needed.

Contribution

Star ⭐ this repo if you find it useful. Any feedback is much appreciated. For official support / user credentials, contact your Key Account Manager (KAM).

Metadata

Release files for ismslib 2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ismslib 2.1
File Size Uploaded Provenance Actions
ismslib-2.1.tar.gz 3.7 kB Without provenance Details for ismslib-2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ismslib 2.1
File Interpreter ABI Platform Actions
ismslib-2.1-py3-none-any.whl Python 3 none any Details for ismslib-2.1-py3-none-any.whl

Total release size: 20.1 kB

Release files / ismslib-2.1.tar.gz

Download URL ismslib-2.1.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c8b5062dcb1bf0aa46ed30d27777385d673adf72b28f45bc2493ca742aef7be3
BLAKE2b-256 checksum
How to use checksums
6ef16c342a73e78900cdd2a040d32febd732aebbf390efd6f3be5460a29087cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

Release files / ismslib-2.1-py3-none-any.whl

Download URL ismslib-2.1-py3-none-any.whl
Size 16.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3120c169ae8739b7da0b20c01d633a98b30e96b966844a570c4eb50c83fec6c6
BLAKE2b-256 checksum
How to use checksums
6846db01f6603a09f1feb98b7f940912f6c062f965be8bc4001ce208ba19938a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

Security for ismslib 2.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page