Skip to main content

No project description provided

Project description

yapsl

yapsl (Yet Another Python Sms Library) allows to send SMS from python by using a local connected modem (e.g. Huawei E220). The library is at the moment in a beta-state and does not yet implement everything. E.g. the message delivery confirmation is not yet implemented.

Also it's required that the PIN is already entered (or that no PIN is used at all). If that's not the case, the library will raise an exception.

Usage

from yapsl import SmsType, SmsGateway

gw = SmsGateway('/dev/ttyUSB0', verbose=False) # verbose=True is mostly for debugging purposes:
                                               # it'll show the complete communication with the modem
                                               # (plus some more logs)

if not gw.is_connected():
    print("Not connected!")
    print("Auto select network")
    gw.auto_select_network()
    sleep(60)

# send an ordinary SMS
gw.send('0786391538', 'this is a test message')

# send a "flash"-SMS (this is usually a popup and by default these SMS are not stored)
gw.send('0786391538', 'this is a test message', flash=True)

# send a silent SMS (text wont be shown: this is just some kind of 'ping')
gw.send('0786391538', 'this is a test message', type=SmsType.TYPE_0)

# send a replaceable SMS (note there exist only 7 of these replaceable SMS)
gw.send('0786391538', 'this is a test message', type=SmsType.REPLACE_TYPE_1)

# replace the previous sent SMS
gw.send('0786391538', 'this is NOT a test message', type=SmsType.REPLACE_TYPE_1)

TODO

  • Check the specs what should happen if a flash-SMS is combined with other SMS
  • Allow it to get the 'sms-received-confirmations' in python
  • Improve the API

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

yapsl-0.1.2.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

yapsl-0.1.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file yapsl-0.1.2.tar.gz.

File metadata

  • Download URL: yapsl-0.1.2.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.6 Linux/6.0.6-76060006-generic

File hashes

Hashes for yapsl-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ff225564ddfca8fe7c2e53e91266c28526fa867f704060de4efe02f9ede91be0
MD5 76f5a187ca5bf05a034173a84fa12e6d
BLAKE2b-256 32509c11d6a9cb8d5eb43e32eff805a9b1c5e14d272107b2a4b1018e5b3d67f1

See more details on using hashes here.

File details

Details for the file yapsl-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: yapsl-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.10.6 Linux/6.0.6-76060006-generic

File hashes

Hashes for yapsl-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 20a30f61d3cb139b2c7bac975495d914789228cda4e2a3b8c9da8a1209aa2543
MD5 522ecf8bdc332a2d8986dec05d70cfac
BLAKE2b-256 fdafbee67efba47e209224c6c7aaa763d95d925e6a9c6b6028256b8ba8096955

See more details on using hashes here.

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