Skip to main content

A simple wrapper to send SMS through available gateways.

Project description

A simple wrapper to send SMS through available gateways.

Gateways

Install

pip install smsit

Usage

Basic:

from smsit import SMS
from smsit.gateways import SMSMagicGateway

config = {
    'api_key': '0000',
    'sender_id': '1111'
}
sms = SMS(
    text='Hi',
    receiver='9893311223344'
)

SMSMagicGateway(config).send(sms)

With gateway manager:

from smsit import SMS, SMSGatewayManager
from smsit.gateways import SMSMagicGateway, NikSMSGateway

config = {
    'smsmagic': {
        'api_key': '0000',
        'sender_id': '1111'
    },
    'niksms': {
        'username': '0000',
        'password': '0000',
        'sender': '0000'
    }
}
sms = SMS(
    text='Hi',
    receiver='9893311223344'
)

manager = SMSGatewayManager()
manager.register('smsmagic', SMSMagicGateway)
manager.register('niksms', NikSMSGateway)
manager.configure(config)
manager.send('smsmagic', sms)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smsit-1.0.2.tar.gz (5.7 kB view hashes)

Uploaded source

Built Distribution

smsit-1.0.2-py3-none-any.whl (7.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page