yapsl
yapsl (Yet Another Python Sms Library) allows to send SMS from python by using a local connected modem (e.g. Huawei E220). 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)
# Optional: It's possible to check if the modem is connected to a network (this is as well always done when sending an SMS)
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', '3...', type=SmsType.REPLACE_TYPE_1)
# replace the previous sent SMS (a few times)
gw.send('0786391538', '2...', type=SmsType.REPLACE_TYPE_1)
gw.send('0786391538', '1...', type=SmsType.REPLACE_TYPE_1)
gw.send('0786391538', 'Hey:D', type=SmsType.REPLACE_TYPE_1)
TODO
- Allow it to get the 'sms-received-confirmations' in python
Metadata
Release files for yapsl 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| yapsl-0.1.4.tar.gz | 4.7 kB | Without provenance | Details for yapsl-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| yapsl-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for yapsl-0.1.4-py3-none-any.whl |
Total release size: 9.7 kB
Release files / yapsl-0.1.4.tar.gz
| Download URL | yapsl-0.1.4.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b3520029c3722a2e789e2d589407d39373ed74d863dcc38b1fce0077a5786048
|
|
BLAKE2b-256 checksum How to use checksums |
3f5449f11019241948d9ba2fa9c2c316106765f860541134ed04fa2e2fb47e2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.10.6 Linux/6.0.6-76060006-generic
|
Release files / yapsl-0.1.4-py3-none-any.whl
| Download URL | yapsl-0.1.4-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
125d3d50926c0720dafac102c2ea50a830baf247ff67146e078e7d0e40feb4f2
|
|
BLAKE2b-256 checksum How to use checksums |
517ee96a01e4c21199215603cd43c3619b335e41bb5577e4a070e8318578d2dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.12 CPython/3.10.6 Linux/6.0.6-76060006-generic
|
Security for yapsl 0.1.4
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.