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-0.1.2.tar.gz (3.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page