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.1.0.tar.gz (6.4 kB view details)

Uploaded Source

File details

Details for the file smsit-1.1.0.tar.gz.

File metadata

  • Download URL: smsit-1.1.0.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.2

File hashes

Hashes for smsit-1.1.0.tar.gz
Algorithm Hash digest
SHA256 182f2956dcc3c66b9b3af6bc3a6349a678d835fabc9f09216108f7de88502251
MD5 58292477ddc0d28267296b5e05f0b860
BLAKE2b-256 a6c69e4459e1201c39a73f88bf3221b5787669d48fc6ed8a5fc86bef308aaf79

See more details on using hashes here.

Supported by

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